-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
75 lines (68 loc) · 1.96 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import React from 'react';
import { Text, View, } from 'react-native';
import { createAppContainer, createSwitchNavigator } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import AuthScreen from './src/auth/auth.js';
import PinCodeScreen from './src/auth/pin-code.js';
import MnemonicGenerateConnect from './src/auth/mnemonic-generate.js';
import MnemonicDisplayScreen from './src/auth/mnemonic-display.js';
import App from './src/main.js';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import AppReducers from './src/store/reducers/index.js';
import MnemonicSignScreen from './src/auth/mnemonic-sign.js';
import SplashScreen from 'react-native-splash-screen';
import AuthPinCodeScreen from './src/auth/auth-pin-code.js';
import NavigationService from './src/utils/NavigationService.js';
const AuthStack = createStackNavigator({
Auth: AuthScreen,
MnemonicDisplay: MnemonicDisplayScreen,
MnemonicSign: MnemonicSignScreen,
MnemonicGenerate: MnemonicGenerateConnect,
PinCode: PinCodeScreen,
}, {
defaultNavigationOptions: {
headerBackTitle: null,
headerTintColor: '#000',
headerLeftContainerStyle: {
paddingLeft: 16,
},
headerTitleStyle: {
fontSize: 17,
},
headerStyle: {
elevation: 0,
shadowOpacity: 0,
borderBottomWidth: 0,
},
},
});
const AppNavigationContainer = createAppContainer(
createSwitchNavigator(
{
App: App,
Auth: AuthStack,
AuthPinCode: AuthPinCodeScreen,
},
{
initialRouteName: 'Auth',
}
)
);
const store = createStore(AppReducers);
export default class Root extends React.Component {
render() {
return (
<Provider store={store}>
<AppNavigationContainer
ref={navigatorRef => {
NavigationService.setTopLevelNavigator(navigatorRef);
}}
/>
</Provider>
)
}
componentDidMount() {
SplashScreen.hide();
}
}