-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
56 lines (52 loc) · 1.55 KB
/
Copy pathApp.tsx
File metadata and controls
56 lines (52 loc) · 1.55 KB
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
import React from 'react';
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {HomeScreen} from './src/screens/HomeScreen';
import {ScanDevicesScreen} from './src/screens/ScanDevicesScreen';
import type {RootStackParamList} from './src/navigation/types';
import { SafeAreaView } from 'react-native-safe-area-context';
import { StyleSheet } from 'react-native';
const Stack = createNativeStackNavigator<RootStackParamList>();
function App(): React.JSX.Element {
return (
<SafeAreaView style={styles.container}>
<NavigationContainer>
<Stack.Navigator
initialRouteName="Home"
screenOptions={{
headerStyle: {
backgroundColor: '#f5f5f5',
},
headerTintColor: '#333',
headerTitleStyle: {
fontWeight: 'bold',
},
}}>
<Stack.Screen
name="Home"
component={HomeScreen}
// options={{
// title: 'Home',
// }}
options={{headerShown: false}}
/>
<Stack.Screen
name="ScanDevices"
component={ScanDevicesScreen}
options={{
title: 'Scan Devices',
headerBackTitle: 'Back',
}}
/>
</Stack.Navigator>
</NavigationContainer>
</SafeAreaView>
);
}
export default App;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#f5f5f5',
},
});