Skip to content

Instantly share code, notes, and snippets.

@hannigand
Created February 22, 2017 11:50
Show Gist options
  • Save hannigand/97fc570d181e32a45130a59ffc9486c8 to your computer and use it in GitHub Desktop.
Save hannigand/97fc570d181e32a45130a59ffc9486c8 to your computer and use it in GitHub Desktop.
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