This repository has been archived by the owner on Jul 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
App.tsx
47 lines (40 loc) · 1.54 KB
/
App.tsx
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
43
44
45
46
47
import React from 'react'
import { NavigationContainer } from '@react-navigation/native'
import { createStackNavigator } from '@react-navigation/stack'
import { Provider } from 'react-redux'
import store from './src/redux/store'
import { connect } from 'react-redux'
import { getThemeParam } from './src/themes'
import Home from './src/components/Home/Home'
import SelectLanguage from './src/components/Home/SelectLanguage'
import Settings from './src/components/Settings'
const Stack = createStackNavigator()
const StackNavigator = ({ theme }) => (
<Stack.Navigator screenOptions={{
animationEnabled: false,
headerStyle: { backgroundColor: getThemeParam('headerBackgroundColor', theme) },
headerTitleStyle: { color: getThemeParam('descTextColor', theme) },
headerTintColor: getThemeParam('descTextColor', theme)
}}>
<Stack.Screen
name="Home"
component={Home}
options={{ headerShown: false }} />
<Stack.Screen
name="Home.SelectLanguage"
component={SelectLanguage}
options={{ headerTitle: 'Select language' }} />
<Stack.Screen
name="Settings"
component={Settings}
options={{ headerTitle: 'Settings' }} />
</Stack.Navigator>
)
const ConnectedNavigator = connect(state => ({ theme: state.theme.theme }))(StackNavigator)
export default () => (
<Provider store={store}>
<NavigationContainer>
<ConnectedNavigator />
</NavigationContainer>
</Provider>
)