Menu.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import React, { Component } from 'react';
  2. import { View, Text, TouchableOpacity } from 'react-native';
  3. import { connect } from 'react-redux';
  4. import { Actions } from 'react-native-router-flux';
  5. import { initLSClase } from '../actions/';
  6. import MyAbout from './MyAbout';
  7. import LSListaClases from './LSListaClases';
  8. import { Card, CardSection } from '../components/common';
  9. class Menu extends Component {
  10. componentWillMount(){
  11. this.props.initLSClase();
  12. }
  13. componentWillReceiveProps() {
  14. this.props.initLSClase();
  15. }
  16. render() {
  17. return (
  18. <View style={{flex:1}}>
  19. <TouchableOpacity onPress={() => Actions.ListaCursadas()}>
  20. <Card>
  21. <CardSection>
  22. <Text>Cursadas</Text>
  23. </CardSection>
  24. </Card>
  25. </TouchableOpacity>
  26. <TouchableOpacity onPress={() => Actions.Live()}>
  27. <Card>
  28. <CardSection>
  29. <Text>Curso en vivo</Text>
  30. </CardSection>
  31. </Card>
  32. </TouchableOpacity>
  33. <TouchableOpacity onPress={() => Actions.LSClases()}>
  34. <Card>
  35. <CardSection>
  36. <Text>Clases descargadas</Text>
  37. </CardSection>
  38. </Card>
  39. </TouchableOpacity>
  40. <TouchableOpacity>
  41. <Card>
  42. <CardSection>
  43. <Text>Perfil</Text>
  44. </CardSection>
  45. </Card>
  46. </TouchableOpacity>
  47. <TouchableOpacity onPress={() => Actions.About()}>
  48. <Card>
  49. <CardSection>
  50. <Text>Como llegar / acerca de / ??</Text>
  51. </CardSection>
  52. </Card>
  53. </TouchableOpacity>
  54. </View>
  55. );
  56. };
  57. }
  58. export default connect(null, { initLSClase })(Menu);