Created
February 22, 2017 11:50
-
-
Save hannigand/97fc570d181e32a45130a59ffc9486c8 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
if(!this.state.filterVideos || this.state.filterVideos === 'all') { | |
return ( | |
<View> | |
<ScrollView> | |
<View style={ styles.container }> | |
<InfoBar | |
message="Please note, your CPD record can take up to 24 hours to update" | |
/> | |
<TabBar | |
filterVideos={ this.filterVideos } | |
setActive="all" /> | |
{ | |
this.state.videos | |
.map(video => | |
<PlaylistItem | |
style={ { flex: 1 } } | |
key={ video.id } | |
video={ video } | |
updateStatement={ this.updateStatement } | |
/> | |
) | |
} | |
</View> | |
</ScrollView> | |
</View> | |
) | |
} else if (this.state.filterVideos === 'structured') { | |
return ( | |
<View> | |
<ScrollView> | |
<View style={ styles.container }> | |
<InfoBar | |
message="Please note, your CPD record can take up to 24 hours to update" | |
/> | |
<TabBar | |
filterVideos={ this.filterVideos } | |
setActive="structured" /> | |
{ | |
this.state.structuredVideos | |
.map(video => | |
<PlaylistItem | |
style={ { flex: 1 } } | |
key={ video.id } | |
video={ video } | |
updateStatement={ this.updateStatement } | |
/> | |
) | |
} | |
</View> | |
</ScrollView> | |
</View> | |
) | |
} else if(this.state.filterVideos === 'unstructured') { | |
return ( | |
<View> | |
<ScrollView> | |
<View style={ styles.container }> | |
<InfoBar | |
message="Please note, your CPD record can take up to 24 hours to update" | |
/> | |
<TabBar | |
filterVideos={ this.filterVideos } | |
setActive="unstructured" /> | |
{ | |
this.state.unstructuredVideos | |
.map(video => | |
<PlaylistItem | |
style={ { flex: 1 } } | |
key={ video.id } | |
video={ video } | |
updateStatement={ this.updateStatement } | |
/> | |
) | |
} | |
</View> | |
</ScrollView> | |
</View> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment