-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
104 lines (99 loc) · 3.24 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import * as React from 'react';
import {useCallback,useEffect} from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Ded from './Ded';
import Strike from './Strike';
import Veedu from './Veedu';
import Chase from './Chase';
import Homepage from './Homepage';
import Scorr from './Scoreboard';
import Draw from './Draw';
import Welcomescreen from './Welcomescreen';
import {useFonts} from 'expo-font';
import * as SplashScreen from 'expo-splash-screen';
// import { Flip } from './Flip';
const Stack = createNativeStackNavigator();
const App = () => {
console.log(process.env.NODE_ENV);
const [fontsLoaded] = useFonts({
"Inter-Black": require('./assets/fonts/RobusDemo.otf'),
"IBM Plex Mono": require('./assets/fonts/IBMPlexMono-Bold.ttf'),
"FlipClock":require('./assets/fonts/flipclock.ttf')
});
useEffect(() =>{
async function prepare(){
await SplashScreen.preventAutoHideAsync();
}
})
const onLayoutRootView = useCallback(async ()=>{
if(fontsLoaded){
await SplashScreen.hideAsync();
}
}, [fontsLoaded]);
if(!fontsLoaded){
return undefined;
} else{
SplashScreen.preventAutoHideAsync();
}
return (
<NavigationContainer >
<Stack.Navigator>
<Stack.Screen name="Welcome" options={{headerStyle:{
backgroundColor:'#7FA2D1'
},headerTintColor:"#7FA2D1",
headerTitleAlign:'center',
headerTitleStyle:{color:'black'}}} component={Welcomescreen}/>
<Stack.Screen name="Team" options={{headerStyle:{
backgroundColor:'#7FA2D1'
},headerTintColor:"#7FA2D1",
headerTitleAlign:'center',
headerTitleStyle:{color:'black'}}} component={Homepage}/>
<Stack.Screen
name="Home"
component={Ded}
options={{headerStyle:{
backgroundColor:'#7FA2D1'
},headerTintColor:"#7FA2D1",
headerTitleAlign:'center',
headerTitleStyle:{color:'black'}}}/>
<Stack.Screen name="Veedu" component={Veedu}
options={{headerStyle:{
backgroundColor:'#7FA2D1'
},headerTintColor:"#7FA2D1",
headerTitleAlign:'center',
headerTitleStyle:{color:'black'}}}
/>
{/* <Stack.Screen name="Flip" component={Flip} /> */}
<Stack.Screen name="Strike" component={Strike}
options={{headerStyle:{
backgroundColor:'#7FA2D1'
},headerTintColor:"#7FA2D1",
headerTitleAlign:'center',
headerTitleStyle:{color:'black'}}}
/>
<Stack.Screen name="Draw" component={Draw}
options={{headerStyle:{
backgroundColor:'#7FA2D1'
},headerTintColor:"#7FA2D1",
headerTitleAlign:'center',
headerTitleStyle:{color:'black'}}}
/>
<Stack.Screen name="Chase" component={Chase}
options={{headerStyle:{
backgroundColor:'#7FA2D1'
},headerTintColor:"#7FA2D1",
headerTitleAlign:'center',
headerTitleStyle:{color:'black'}}}
/>
<Stack.Screen name="Scorr" component={Scorr}
options={{headerStyle:{
backgroundColor:'#7FA2D1'
},headerTintColor:"#7FA2D1",
headerTitleAlign:'center',
headerTitleStyle:{color:'black'}}}/>
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;