-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathApp.js
47 lines (39 loc) · 1.28 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
import React from 'react';
import type {Node} from 'react';
import {
SafeAreaView,
StatusBar,
useColorScheme,
StyleSheet,
} from 'react-native';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import LoadingScreen from './src/screens/LoadingScreen';
import LoginScreen from './src/screens/LoginScreen';
import AccountScreen from './src/screens/AccountScreen';
import {AuthContextProvider} from './src/context/AuthContext';
const Stack = createNativeStackNavigator();
const App: () => Node = () => {
const isDarkMode = useColorScheme() === 'dark';
return (
<SafeAreaView style={styles.root}>
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
<AuthContextProvider>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Loading" component={LoadingScreen} />
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Account" component={AccountScreen} />
</Stack.Navigator>
</NavigationContainer>
</AuthContextProvider>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
root: {
flex: 1,
justifyContent: 'center',
},
});
export default App;