No Description

Home_page.js 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import React, {useState, useEffect} from 'react'
  2. import { Button, Text, View, StyleSheet} from 'react-native'
  3. import {FlatList, ListViewBase } from 'react-native'
  4. import {TouchableOpacity} from 'react-native-gesture-handler'
  5. import {List, Divider} from 'react-native-paper'
  6. import Loading from './Loading'
  7. import firebase from 'firebase';
  8. import { styles } from "../../config/styles";
  9. import { TextInput, TouchableWithoutFeedback, Keyboard, ImageBackground} from "react-native";
  10. import { connect } from 'react-redux'
  11. import { bindActionCreators } from 'redux'
  12. import { fetchUser } from '../../redux/actions/index'
  13. export function Home_page({navigation}) {
  14. return (
  15. <TouchableWithoutFeedback style={styles.stdcontainer} onPress={Keyboard.dismiss} accessible={false}>
  16. <ImageBackground style={styles.stdcontainer} source={require('../../assets/yellow-white.jpg')}>
  17. <CustomButton marginTop={25} title="Calendar" onPress={() => navigation.navigate('Calendar')}/>
  18. </ImageBackground>
  19. </TouchableWithoutFeedback>
  20. );
  21. }
  22. const mapStateToProps = (store) => ({
  23. currentUser: store.userState.currentUser
  24. })
  25. const mapDispatchProps = (dispatch) => bindActionCreators({fetchUser}, dispatch);
  26. export default connect(mapStateToProps, mapDispatchProps)(Home_page);
  27. const mapStateToProps = (store) => ({
  28. currentUser: store.userState.currentUser
  29. })
  30. const mapDispatchProps = (dispatch) => bindActionCreators({fetchUser}, dispatch);
  31. export default connect(mapStateToProps, mapDispatchProps)(Home_page);