forked from badger-cash/badger-mobile
-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
70 lines (60 loc) · 2.37 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import React from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import styled, { ThemeProvider } from "styled-components";
import { Provider } from "react-redux";
import { View, LogBox } from "react-native";
LogBox.ignoreLogs(["Require cycle"]);
import { PersistGate } from "redux-persist/integration/react";
import { getStore } from "./data/store";
import { spaceBadger } from "./themes/spaceBadger";
import MainAppStack from "./navigation/MainTabNavigator";
import AuthLoadingScreen from "./navigation/AuthLoadingScreen";
// Auth Screens
import WelcomeScreen from "./screens/WelcomeScreen";
import TermsOfUseScreen from "./screens/TermsOfUseScreen";
import PrivacyNoticeScreen from "./screens/PrivacyNoticeScreen";
import CreateWalletScreen from "./screens/CreateWalletScreen";
import RestoreWalletScreen from "./screens/RestoreWalletScreen";
const { store, persistor } = getStore();
const Stack = createStackNavigator();
const AuthStack = () => {
return (
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="Welcome" component={WelcomeScreen} />
<Stack.Screen name="AcceptTermsOfUse" component={TermsOfUseScreen} />
<Stack.Screen name="PrivacyNotice" component={PrivacyNoticeScreen} />
<Stack.Screen name="CreateWallet" component={CreateWalletScreen} />
<Stack.Screen name="RestoreFromBackup" component={RestoreWalletScreen} />
</Stack.Navigator>
);
};
const AppWrapper = styled(View)`
flex: 1;
`;
const bchPrefix = "bitcoincash";
const slpPrefix = "simpleledger";
const App = () => {
return (
<NavigationContainer>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<ThemeProvider theme={spaceBadger}>
<AppWrapper>
{/* <AppNavigator /> */}
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen
name="AuthLoadingCheck"
component={AuthLoadingScreen}
/>
<Stack.Screen name="AuthStack" component={AuthStack} />
<Stack.Screen name="Main" component={MainAppStack} />
</Stack.Navigator>
</AppWrapper>
</ThemeProvider>
</PersistGate>
</Provider>
</NavigationContainer>
);
};
export default App;