-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
71 lines (66 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
58
59
60
61
62
63
64
65
66
67
68
69
import { StatusBar } from 'expo-status-bar';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { Button, TouchableOpacity } from 'react-native';
import useCachedResources from './hooks/useCachedResources';
import useColorScheme from './hooks/useColorScheme';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import StackNavigator from 'react-navigation';
import React, { Component } from 'react';
import ModalScreen from './screens/ModalScreen';
import SessionScreen from './screens/SessionScreen';
import WebCamScreen from './screens/WebCamScreen';
import { NativeStackScreenProps } from '@react-navigation/native-stack';
const Stack = createNativeStackNavigator();
/*export default function App() {
const isLoadingComplete = useCachedResources();
const colorScheme = useColorScheme();
const Stack = createNativeStackNavigator();
if (!isLoadingComplete) {
return null;
} else {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="EnterSession">
<Stack.Screen
name="EnterSession"
component={SessionScreen}
options={({ navigation }) => ({
title: 'Awesome app',
navigate: () => (
<Button title="" onPress={() => navigation.navigate("Cache")} />
),
})}/>
<Stack.Screen name="Cache" component={ModalScreen} />
<Stack.Screen name="WebCam" component={WebCamScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
}*/
/*const AppNavigator = StackNavigator({
Setting: { screen: ModalScreen },
Home: { screen: SessionScreen },
WebCam: {screen:WebCamScreen},
});
export default class App extends Component {
render() {
return (
<AppNavigator />
);
}
}
*/
export default class App extends Component {
render() {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="EnterSession">
<Stack.Screen name="EnterSession" component={SessionScreen}/>
<Stack.Screen name="Cache" component={ModalScreen} />
<Stack.Screen name="WebCam" component={WebCamScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
}