in js/tabs/schedule/SessionsCarousel.js [129:200]
icon: require("../../common/img/header/share.png"),
onPress: this.shareCurrentSession
};
return (
<View style={styles.container}>
<StatusBar barStyle="light-content" animated={true} />
<F8Header
backgroundColor={F8Colors.palatinateBlue}
itemsColor={F8Colors.white}
navItem={backItem}
rightItem={rightItem}
style={Platform.OS === "ios" ? { height: 70 } : {}}
>
<View style={styles.headerContent}>
<Text style={styles.day}>{`DAY ${this.state.day}`}</Text>
<Text style={styles.time}>{sectionTitle.toLowerCase()}</Text>
<F8PageControl count={sectionLength} selectedIndex={rowIndex} />
</View>
</F8Header>
<Carousel
count={this.state.count}
selectedIndex={this.state.selectedIndex}
onSelectedIndexChange={this.handleIndexChange}
renderCard={this.renderCard}
/>
</View>
);
}
renderCard(index: number): ReactElement {
// const iOSKey = Platform.OS === 'ios' ? { key: `SCC_${this.state.flatSessionsList[index].id}`} : {};
return (
<F8SessionDetails
navigator={this.props.navigator}
session={this.state.flatSessionsList[index]}
/>
);
}
shareCurrentSession() {
const session = this.state.flatSessionsList[this.state.selectedIndex];
this.props.dispatch(shareSession(session));
}
componentDidMount() {
this.track(this.state.selectedIndex);
this.props.dispatch(loadFriendsSchedules());
}
dismiss() {
this.props.navigator.pop();
}
handleIndexChange(selectedIndex: number) {
this.track(selectedIndex);
this.setState({ selectedIndex });
}
track(index: number) {
const { id } = this.state.flatSessionsList[index];
F8Analytics.logEvent("View Session", 1, { id });
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: F8Colors.white
},
headerContent: {
android: {