|
| 1 | +import React from 'react'; |
| 2 | +import {StatusBar} from 'react-native'; |
| 3 | +import {NavigationContainer} from '@react-navigation/native'; |
| 4 | +import {createStackNavigator} from '@react-navigation/stack'; |
| 5 | + |
| 6 | +import LoadingScreen from './src/screens/LoadingScreen'; |
| 7 | +import OnboardingScreen from './src/screens/OnboardingScreen'; |
| 8 | +import HomeScreen from './src/screens/HomeScreen/HomeScreen'; |
| 9 | +import DetailScreen from './src/screens/DetailScreen'; |
| 10 | +import colors from './src/utils/colors'; |
| 11 | + |
| 12 | +const Stack = createStackNavigator(); |
| 13 | + |
| 14 | +const App = () => { |
| 15 | + return ( |
| 16 | + <NavigationContainer> |
| 17 | + <StatusBar backgroundColor={colors.darkWhite} barStyle="dark-content" /> |
| 18 | + <Stack.Navigator initialRouteName="Loading"> |
| 19 | + <Stack.Screen |
| 20 | + options={{headerShown: false}} |
| 21 | + name="Loading" |
| 22 | + component={LoadingScreen} |
| 23 | + /> |
| 24 | + <Stack.Screen |
| 25 | + options={{headerShown: false, gestureEnabled: false}} |
| 26 | + name="Onboarding" |
| 27 | + component={OnboardingScreen} |
| 28 | + /> |
| 29 | + <Stack.Screen |
| 30 | + name="Home" |
| 31 | + options={{ |
| 32 | + headerTitleAlign: 'left', |
| 33 | + headerTitleStyle: { |
| 34 | + fontSize: 23, |
| 35 | + fontWeight: 'bold', |
| 36 | + color: colors.title, |
| 37 | + }, |
| 38 | + headerStyle: { |
| 39 | + shadowOffset: {height: 0, width: 0}, |
| 40 | + backgroundColor: colors.darkWhite, |
| 41 | + elevation: 0, |
| 42 | + }, |
| 43 | + |
| 44 | + headerTitle: 'My Notes', |
| 45 | + gestureEnabled: false, |
| 46 | + headerLeft: null, |
| 47 | + }} |
| 48 | + component={HomeScreen} |
| 49 | + /> |
| 50 | + <Stack.Screen |
| 51 | + name="Detail" |
| 52 | + options={{ |
| 53 | + headerBackTitleVisible: false, |
| 54 | + headerTitle: '', |
| 55 | + headerStyle: { |
| 56 | + shadowOffset: {height: 0, width: 0}, |
| 57 | + backgroundColor: colors.white, |
| 58 | + elevation: 0, |
| 59 | + }, |
| 60 | + }} |
| 61 | + component={DetailScreen} |
| 62 | + /> |
| 63 | + </Stack.Navigator> |
| 64 | + </NavigationContainer> |
| 65 | + ); |
| 66 | +}; |
| 67 | + |
| 68 | +export default App; |
0 commit comments