From 7b69719e22169e7e729a60f9cb56ee408df4e8f3 Mon Sep 17 00:00:00 2001
From: Sofiya Tepikin <sofiya.tepikin@gmail.com>
Date: Thu, 6 Feb 2020 00:17:25 +0100
Subject: [PATCH] Removes linter warning

---
 components/cycle-day/select-tab-group.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/components/cycle-day/select-tab-group.js b/components/cycle-day/select-tab-group.js
index a761a24b..63c05368 100644
--- a/components/cycle-day/select-tab-group.js
+++ b/components/cycle-day/select-tab-group.js
@@ -8,12 +8,13 @@ import AppText from '../app-text'
 
 export default class SelectTabGroup extends Component {
   render() {
+    const { buttons, onSelect } = this.props
     return (
       <View style={styles.selectTabGroup}>
         {
-          this.props.buttons.map(({ label, value }, i) => {
+          buttons.map(({ label, value }, i) => {
             let firstOrLastStyle
-            if (i === this.props.buttons.length - 1) {
+            if (i === buttons.length - 1) {
               firstOrLastStyle = styles.selectTabLast
             } else if (i === 0) {
               firstOrLastStyle = styles.selectTabFirst
@@ -23,7 +24,7 @@ export default class SelectTabGroup extends Component {
             if (isActive) activeStyle = styles.selectTabActive
             return (
               <TouchableOpacity
-                onPress={() => isActive ? this.props.onSelect(null) : this.props.onSelect(value)}
+                onPress={() => onSelect(isActive ? null : value)}
                 key={i}
                 activeOpacity={1}
               >
-- 
GitLab