-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
45 lines (40 loc) · 1.07 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
import React from 'react';
import { StyleSheet, Text, View, Image, Dimensions } from 'react-native';
import { StatusBar } from 'expo-status-bar';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import HomePage from './Screens/HomePage'
import { SCREENS } from "./Constants"
const Stack = createStackNavigator();
export default function App() {
return (
<NavigationContainer>
<View style={styles.container}>
<StatusBar hidden />
<NavigationScreens />
</View>
</NavigationContainer>
);
}
const NavigationScreens = () => {
return (
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen name="HomePage" component={HomePage} />
{
SCREENS.map((screenName,i) => (
<Stack.Screen name={screenName.name} component={screenName.component} key={i} />
))
}
</Stack.Navigator>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff5',
},
});