-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
42 lines (40 loc) · 1.39 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React, { useEffect } from 'react';
import { View, Text } from 'react-native';
import { DefaultTheme, Provider as PaperProvider } from 'react-native-paper';
import { connect } from 'react-redux';
import { changeLanguage } from './src/actions/language';
import { updateStoryList,updateStoryDetails } from './src/actions/story';
import theme from './src/theme';
import BottomTab from './src/components/BottomTab';
import SplashScreen from 'react-native-splash-screen';
const App = (props) => {
//console.log(props.navigation);
useEffect(() => {
SplashScreen.hide();
}, []);
return (
<PaperProvider theme={theme}>
{/* <RootNavigator theme={theme}/> */}
{/* <BottomBar theme={theme}/> */}
<BottomTab theme={theme}/>
</PaperProvider>
);
}
const mapStateToProps = (state) =>{
//console.log(state);
return{
language: state.globalReducer.language,
stories: state.globalReducer.stories,
story: state.globalReducer.story,
sidemenu: state.globalReducer.sidemenu,
}
};
const mapDispatchToProps = (dispatch) =>{
return{
updateLang: (language) => dispatch(changeLanguage(language)),
getStories: (stories) => dispatch(updateStoryList(stories)),
getStory: (story) => dispatch(updateStoryDetails(story)),
}
};
export default connect(mapStateToProps,mapDispatchToProps)(App);
//export default App;