Last active
March 22, 2017 16:47
-
-
Save justim/9aaba6a3c4b40a3fe55d05e887b0f61f 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
class InstancesView extends Component { | |
constructor() { | |
super(); | |
this.goToPage = this.goToPage.bind(this); | |
} | |
goToPage(page) { | |
this._scrollableTabViewRef.goToPage(page); | |
} | |
render() { | |
return ( | |
<ScrollableTabView | |
ref={ref => { this._scrollableTabViewRef = ref; }} | |
renderTabBar={() => <ScrollableTabBar />} | |
style={styles.panelContainer} | |
> | |
<View tabLabel="Courses" style={styles.panelWrapper}> | |
<ProgramsList | |
instanceId={this._id} | |
fetch={this._fetchPrograms} | |
refresh={this._refreshPrograms} | |
/> | |
</View> | |
<View tabLabel="Events" style={styles.panelWrapper}> | |
<EventsList | |
fetch={this._fetchEvents} | |
refresh={this._refreshEvents} | |
/> | |
</View> | |
<View tabLabel="Updates" style={styles.panelWrapper}> | |
<MessagesList | |
goToPage={this.goToPage} | |
fetch={this._fetchMessages} | |
refresh={this._refreshMessages} | |
/> | |
</View> | |
</ScrollableTabView> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment