-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathApp.js
48 lines (41 loc) · 1.44 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 {AppearanceProvider, useColorScheme} from 'react-native-appearance';
import {NavigationContainer} from '@react-navigation/native';
import {createStackNavigator} from '@react-navigation/stack';
import BuildConfigs from './src/config';
import {SKHUsDarkTheme, SKHUsLightTheme} from './src/components/themes';
import {StatusBar} from 'expo-status-bar';
import Login from './src/Login';
import MainShell from './src/MainShell';
import About from './src/screens/about';
import * as Sentry from 'sentry-expo';
import {Asset} from 'expo-asset';
Asset;
const Stack = createStackNavigator();
function AuthStack(){
return(
<Stack.Navigator initialRouteName="Login" headerMode="none">
<Stack.Screen name="Login" component={Login}/>
<Stack.Screen name="About" component={About}/>
</Stack.Navigator>
);
}
Sentry.init({
dsn: BuildConfigs.SENTRY_DSN,
enableInExpoDevelopment: false,
debug: true
});
export default function App(){
const scheme = useColorScheme();
return (
<AppearanceProvider>
<NavigationContainer theme={scheme === 'dark' ? SKHUsDarkTheme : SKHUsLightTheme}>
<Stack.Navigator initialRouteName="AuthStack" headerMode="none">
<Stack.Screen name="AuthStack" component={AuthStack}/>
<Stack.Screen name="MainStack" component={MainShell}/>
</Stack.Navigator>
</NavigationContainer>
<StatusBar style="auto" />
</AppearanceProvider>
);
}