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

Merge branch 'fix-linter-warning' into 'master'

Fix linter warning

See merge request bloodyhealth/drip!261
parents 28356d66 882f183c
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,11 @@
"plugins": [
"react"
],
"settings": {
"react": {
"version": require('./package.json').dependencies.react,
},
},
"rules": {
"quotemark": false,
"ordered-imports": false,
......
......@@ -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