This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.tsx
57 lines (53 loc) · 2.27 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
import React from 'react'
import { Provider } from 'react-redux'
import { NavigationContainer } from '@react-navigation/native'
import { createNativeStackNavigator } from '@react-navigation/native-stack'
import Welcome from './src/screens/Welcome'
import Login from './src/screens/Login'
import * as Sentry from 'sentry-expo'
import { SENTRY_DSN } from '@env'
import NewLogin from './src/screens/NewLogin'
import Signup from './src/screens/Signup'
import Home from './src/screens/Home'
import Students from './src/screens/Students'
import StudentInfo from './src/screens/StudentInfo'
import PastIncidents from './src/screens/PastIncidents'
import IncidentInfo from './src/screens/IncidentInfo'
import { store } from './src/store/StoreConfig'
import Constants from 'expo-constants'
import * as Device from 'expo-device'
import { Platform } from 'react-native'
import OneSignal from 'react-native-onesignal'
import AsyncStorage from '@react-native-async-storage/async-storage'
if (SENTRY_DSN) {
Sentry.init({
dsn: SENTRY_DSN,
debug: true, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production
})
}
if (Device.isDevice && Platform.OS == "android") {
OneSignal.setAppId(Constants?.manifest?.extra?.oneSignalAppId)
AsyncStorage.setItem('oneSignal', 'supported')
} else {
AsyncStorage.setItem('oneSignal', '')
}
export default function App() {
const Stack = createNativeStackNavigator()
return (
<Provider store={store} >
<NavigationContainer>
<Stack.Navigator screenOptions={{ headerShown: false }} initialRouteName='Welcome'>
<Stack.Screen name="Welcome" component={Welcome} />
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="NewLogin" component={NewLogin} />
<Stack.Screen name="Signup" component={Signup} />
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Students" component={Students} />
<Stack.Screen name="StudentInfo" component={StudentInfo} />
<Stack.Screen name="Past Incidents" component={PastIncidents} />
<Stack.Screen name="IncidentInfo" component={IncidentInfo} />
</Stack.Navigator>
</NavigationContainer>
</Provider>
)
}