-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
27 lines (26 loc) · 935 Bytes
/
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
import 'react-native-gesture-handler';
import React from 'react';
import {GestureHandlerRootView} from 'react-native-gesture-handler';
import {DarkTheme, NavigationContainer} from '@react-navigation/native';
import {enableScreens} from 'react-native-screens';
import {Provider} from 'react-redux';
import Store from './src/redux';
import OnboardingScreen from './src/screens/OnboardingScreen/OnboardingScreen';
import DrawerNav from './src/navigation/drawerNav/DrawerNav';
enableScreens();
export default function App() {
const [onboard, setOnboard] = React.useState(true);
return (
<Provider store={Store}>
<NavigationContainer theme={DarkTheme}>
<GestureHandlerRootView style={{flex: 1}}>
{onboard ? (
<OnboardingScreen setOnboard={setOnboard} />
) : (
<DrawerNav />
)}
</GestureHandlerRootView>
</NavigationContainer>
</Provider>
);
}