|
1 | | - |
2 | | -import {createNativeStackNavigator} from "@react-navigation/native-stack"; |
3 | | -import {createNavigationContainerRef, NavigationContainer} from "@react-navigation/native"; |
4 | | -import {HomePage} from "./Screens/HomePage"; |
5 | | -import ContextState from "./Context/ContextState"; |
6 | | -import {ChatPage} from "./Screens/ChatPage"; |
7 | | -import {MailPage} from "./Screens/MailPage"; |
8 | | -import {CodePage} from "./Screens/CodePage"; |
9 | | -import {ToastProvider} from "react-native-toast-notifications"; |
10 | | -import {HistoryChatPage} from "./Screens/HistoryChatPage"; |
11 | | -import {OnboardingScreen} from "./Screens/OnboardingScreen"; |
12 | | -import {useEffect, useState} from "react"; |
13 | | -import AsyncStorage from "@react-native-async-storage/async-storage"; |
14 | | -import {Initial} from "./Screens/Initial"; |
15 | | - |
| 1 | +/* eslint-disable react/react-in-jsx-scope */ |
| 2 | +import {createNativeStackNavigator} from '@react-navigation/native-stack'; |
| 3 | +import {NavigationContainer} from '@react-navigation/native'; |
| 4 | +import {HomePage} from './Screens/HomePage'; |
| 5 | +import ContextState from './Context/ContextState'; |
| 6 | +import {ChatPage} from './Screens/ChatPage'; |
| 7 | +import {MailPage} from './Screens/MailPage'; |
| 8 | +import {CodePage} from './Screens/CodePage'; |
| 9 | +import {ToastProvider} from 'react-native-toast-notifications'; |
| 10 | +import {OnboardingScreen} from './Screens/OnboardingScreen'; |
| 11 | +import {Initial} from './Screens/Initial'; |
16 | 12 |
|
17 | 13 | function App(): JSX.Element { |
18 | | - const Stack = createNativeStackNavigator() |
19 | | - return (<ToastProvider> |
| 14 | + const Stack = createNativeStackNavigator(); |
| 15 | + return ( |
| 16 | + <ToastProvider> |
20 | 17 | <ContextState> |
21 | | - <NavigationContainer > |
22 | | - <Stack.Navigator initialRouteName={'Initial'}> |
23 | | - <Stack.Screen name={"Initial"} component={Initial} options={{ |
24 | | - headerShown:false |
25 | | - }}/> |
26 | | - <Stack.Screen name={"Onboarding"} component={OnboardingScreen} options={{ |
27 | | - headerShown:false |
28 | | - }}/> |
29 | | - <Stack.Screen name={"HomePage"} component={HomePage} options={{ |
30 | | - headerShown:false |
31 | | - }}/> |
32 | | - <Stack.Screen name={"ChatPage"} component={ChatPage} options={{ |
33 | | - headerShown:false |
34 | | - }}/> |
35 | | - <Stack.Screen name={"MailPage"} component={MailPage} options={{ |
36 | | - headerShown:false |
37 | | - }}/> |
38 | | - <Stack.Screen name={"CodePage"} component={CodePage} options={{ |
39 | | - headerShown:false |
40 | | - }}/> |
41 | | - </Stack.Navigator> |
42 | | - </NavigationContainer> |
43 | | - </ContextState></ToastProvider> |
| 18 | + <NavigationContainer> |
| 19 | + <Stack.Navigator initialRouteName={'Initial'}> |
| 20 | + <Stack.Screen |
| 21 | + name={'Initial'} |
| 22 | + component={Initial} |
| 23 | + options={{ |
| 24 | + headerShown: false, |
| 25 | + }} |
| 26 | + /> |
| 27 | + <Stack.Screen |
| 28 | + name={'Onboarding'} |
| 29 | + component={OnboardingScreen} |
| 30 | + options={{ |
| 31 | + headerShown: false, |
| 32 | + }} |
| 33 | + /> |
| 34 | + <Stack.Screen |
| 35 | + name={'HomePage'} |
| 36 | + component={HomePage} |
| 37 | + options={{ |
| 38 | + headerShown: false, |
| 39 | + }} |
| 40 | + /> |
| 41 | + <Stack.Screen |
| 42 | + name={'ChatPage'} |
| 43 | + component={ChatPage} |
| 44 | + options={{ |
| 45 | + headerShown: false, |
| 46 | + }} |
| 47 | + /> |
| 48 | + <Stack.Screen |
| 49 | + name={'MailPage'} |
| 50 | + component={MailPage} |
| 51 | + options={{ |
| 52 | + headerShown: false, |
| 53 | + }} |
| 54 | + /> |
| 55 | + <Stack.Screen |
| 56 | + name={'CodePage'} |
| 57 | + component={CodePage} |
| 58 | + options={{ |
| 59 | + headerShown: false, |
| 60 | + }} |
| 61 | + /> |
| 62 | + </Stack.Navigator> |
| 63 | + </NavigationContainer> |
| 64 | + </ContextState> |
| 65 | + </ToastProvider> |
44 | 66 | ); |
45 | 67 | } |
46 | 68 |
|
|
0 commit comments