Created
October 25, 2019 04:53
-
-
Save lucascardial/ab1c326ab68f7f31552f188bc81761a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function handleActiveAreaClick(activeAreaID) { | |
setState({...state, activeAreaID}); | |
} | |
return ( | |
<React.Fragment> | |
<ScrollViewContainer> | |
{areas.map(area => ( | |
<TabContent | |
key={area.uuid} | |
onTouchEndCapture={e => handleActiveAreaClick(area.uuid)}> | |
<Label>{area.name}</Label> | |
{state.activeAreaID === area.uuid && <ActiveIndicator />} | |
</TabContent> | |
))} | |
</ScrollViewContainer> | |
</React.Fragment> | |
); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment