|
@@ -16,7 +16,6 @@ class Clase extends Component {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
renderView() {
|
|
renderView() {
|
|
|
- const { titulo, profesor, texto, comentarios, respuestas } = this.props.clase;
|
|
|
|
|
if ( this.state.page === 'Teoria' )
|
|
if ( this.state.page === 'Teoria' )
|
|
|
return <Teoria titulo={titulo} profesor={profesor} texto={texto} style={{flex:1}} />;
|
|
return <Teoria titulo={titulo} profesor={profesor} texto={texto} style={{flex:1}} />;
|
|
|
|
|
|
|
@@ -31,19 +30,15 @@ class Clase extends Component {
|
|
|
if (this.props.loading)
|
|
if (this.props.loading)
|
|
|
return <Spinner size="large" />;
|
|
return <Spinner size="large" />;
|
|
|
|
|
|
|
|
|
|
+ var ScrollableTabView = require('react-native-scrollable-tab-view');
|
|
|
|
|
+ const { titulo, profesor, texto, comentarios, respuestas } = this.props.clase;
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
- <View style={styles.container, {flex:1}}>
|
|
|
|
|
- <Tabs selected={this.state.page} style={{backgroundColor:'white'}}
|
|
|
|
|
- selectedStyle={{fontWeight:"700"}}
|
|
|
|
|
- onSelect={ el => {
|
|
|
|
|
- this.setState({ page: el.props.name })
|
|
|
|
|
- } }>
|
|
|
|
|
- <Text name="Teoria">Teoria</Text>
|
|
|
|
|
- <Text name="Videos">Videos</Text>
|
|
|
|
|
- <Text name="Comentarios">Comentarios</Text>
|
|
|
|
|
- </Tabs>
|
|
|
|
|
- {this.renderView()}
|
|
|
|
|
- </View>
|
|
|
|
|
|
|
+ <ScrollableTabView style={styles.container, {flex:1}}>
|
|
|
|
|
+ <Teoria titulo={titulo} profesor={profesor} texto={texto} style={{flex:1}} tabLabel="Teoria" />
|
|
|
|
|
+ <View tabLabel="Videos" />
|
|
|
|
|
+ <Comentarios style={{flex:1}} comentarios={comentarios} respuestas={respuestas} tabLabel="Comentarios" />
|
|
|
|
|
+ </ScrollableTabView>
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|