Skip to content
Snippets Groups Projects
Commit 7b69719e authored by Sofiya Tepikin's avatar Sofiya Tepikin
Browse files

Removes linter warning

parent 580f1e79
No related branches found
No related tags found
No related merge requests found
......@@ -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}
>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment