-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.js
48 lines (45 loc) · 1.32 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
import 'react-native-gesture-handler'
import { NavigationContainer } from '@react-navigation/native'
import * as Linking from 'expo-linking'
import React from 'react';
import { View, Platform } from 'react-native';
import AppMain from './src/app'
import WebApp from './src/app/web'
import { Provider } from 'react-redux'
import { PersistGate } from 'redux-persist/integration/react'
import configureStore from './src/app/account/redux';
const redux = configureStore()
const store = redux.store
const persistor = redux.persistor
const linking = {
prefixes: [
Linking.createURL('/'),
'https://ddaaggeett.xyz',
'https://*.ddaaggeett.xyz',
'ddaaggeett://',
],
config: {
screens: {
},
},
}
export default function App() {
if (Platform.OS === 'web') return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<NavigationContainer linking={linking} fallback={<Text>Loading...</Text>}>
<WebApp />
</NavigationContainer>
</PersistGate>
</Provider>
)
else return (
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<NavigationContainer>
<AppMain />
</NavigationContainer>
</PersistGate>
</Provider>
)
}