-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
44 lines (39 loc) · 1.46 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
43
44
import * as React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import thunkMiddleware from 'redux-thunk';
import {createStore, applyMiddleware} from 'redux';
import {Provider} from 'react-redux';
import HomeContainer from './app/containers/HomeContainer';
import TicketContainer from './app/containers/TicketContainer';
import rootReducer from './app/reducers';
import {BackButton} from '@components';
import {Button} from 'react-native';
const globalStore = createStore(rootReducer, applyMiddleware(thunkMiddleware));
const Stack = createNativeStackNavigator();
function App() {
return (
<Provider store={globalStore}>
<NavigationContainer>
<Stack.Navigator
initialRouteName="Home"
screenOptions={{
headerShadowVisible: false,
cardStyle: {backgroundColor: '#fff'},
}}>
<Stack.Group
screenOptions={({navigation}) => ({
headerBackVisible: false,
headerTitle: () => <></>,
headerLeft: ({canGoBack}) =>
canGoBack && <BackButton navigation={navigation} />,
})}>
<Stack.Screen name="Home" component={HomeContainer} />
<Stack.Screen name="Ticket" component={TicketContainer} />
</Stack.Group>
</Stack.Navigator>
</NavigationContainer>
</Provider>
);
}
export default App;