-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
130 lines (127 loc) · 4.45 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
import * as React from "react";
import { NavigationContainer } from "@react-navigation/native";
import StartMenu from "./screens/StartMenu";
import LoginMenu from "./screens/LoginMenu";
import SignupMenu from "./screens/SignupMenu";
import BottomMenu from "./screens/BottomMenu";
import ForgotPass from "./screens/ForgotPass";
import WelcomeScreen from "./screens/WelcomeScreen";
import SalesScreen from "./screens/SalesScreen";
import ProductInfo from "./screens/ProductInfo";
import HistoryScreen from "./screens/HistoryScreen";
import AddProductsScreen from "./screens/Admin/AddNewProduct";
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import SearchBarcode from "./screens/Admin/SearchByBarcode";
import BottomAdminMenu from "./screens/Admin/BottomAdminMenu";
import { LogBox } from "react-native";
import ProductInfoAdmin from "./screens/Admin/ProductInfoAdmin";
import { UserProvider } from "./screens/UserContext";
import CheckScreen from "./screens/CheckScreen";
import AddProducts from "./screens/Admin/AddProducts";
const Stack = createNativeStackNavigator();
LogBox.ignoreAllLogs();
const App = () => {
const [hideSplashScreen] = React.useState(true);
return (
<>
<UserProvider>
<NavigationContainer>
{hideSplashScreen ? (
<Stack.Navigator
screenOptions={{
headerShown: false,
gestureEnabled: false,
animation: "none",
}}
>
<Stack.Screen name="StartMenu" component={StartMenu} />
<Stack.Screen
name="Login"
component={LoginMenu}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Signup"
component={SignupMenu}
options={{ headerShown: false }}
/>
<Stack.Screen
name="AddProducts"
component={AddProducts}
options={{
headerShown: true,
title: "Замовлення товарів",
}}
/>
<Stack.Screen
name="ForgotPass"
component={ForgotPass}
options={{ headerShown: false }}
/>
<Stack.Screen
name="Welcome"
component={WelcomeScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="BottomAdminMenu"
component={BottomAdminMenu}
options={{ headerShown: false }}
/>
<Stack.Screen
name="ProductInfoAdmin"
component={ProductInfoAdmin}
options={{ headerShown: false }}
/>
<Stack.Screen
name="SearchBarcode"
component={SearchBarcode}
options={{ headerShown: false }}
/>
<Stack.Screen
name="SalesScreen"
component={SalesScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name="ProductInfo"
component={ProductInfo}
initialParams={{}}
options={{
headerShown: true,
title: "Інформація про товар",
headerBackTitle: "Назад",
}}
/>
<Stack.Screen
name="AddProductsScreen"
component={AddProductsScreen}
options={{
headerShown: true,
headerBackTitle: "Назад",
title: "Добавити новий товар",
}}
/>
<Stack.Screen name="CheckScreen" component={CheckScreen} />
<Stack.Screen
name="BottomMenu"
component={BottomMenu}
options={{ headerShown: false }}
/>
<Stack.Screen
name="HistoryScreen"
component={HistoryScreen}
options={{
headerShown: true,
headerBackTitle: "Назад",
title: "Історія",
}}
/>
</Stack.Navigator>
) : null}
</NavigationContainer>
</UserProvider>
</>
);
};
export default App;