-
Notifications
You must be signed in to change notification settings - Fork 0
/
Index.js
71 lines (53 loc) · 3.55 KB
/
Index.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
import React from 'react'
import { useState, useEffect, useRef } from 'react';
import SellerInterface from './Interface/SellerInterface'
import BuyerInterface from './Interface/BuyerInterface'
import Login from './Interface/Login'
import SignUp from './Interface/SignUp'
import { NavigationContainer, useNavigation } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import AsyncStorage from '@react-native-async-storage/async-storage';
import SellersPage from './SellerSideScreens/SellersPage';
import CameraInterface from './SellerSideScreens/CameraInterface';
import ItemsDetail from './SellerSideScreens/ItemsDetail';
import CameraInterfaceForItem from './SellerSideScreens/CameraInterfaceForItem';
import SellerOrderList from './SellerSideScreens/SellerOrdersList';
import OrderDetails from './SellerSideScreens/OrderDetails';
import Dashboard from './Screens/Dashboard';
import Orders from './Screens/Orders';
import Payment from './Screens/Payment';
import ShopGallary from './Screens/ShopGallary';
import ShopePage from './Screens/ShopePage';
export default function Index() {
const navigationRef = useRef();
const Stack = createNativeStackNavigator();
const Email = AsyncStorage.getItem('@Email');
const Password = AsyncStorage.getItem('@Password');
const initialRouteName = (Email!=null && Password!=null )? 'BuyerSideComponents':'Login'
return (
<NavigationContainer ref={navigationRef}>
<Stack.Navigator initialRouteName='Login'
screenOptions={{
headerShown: false
}}
>
<Stack.Screen name='Login' component={Login} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='SellerSideComponents' component={SellerInterface} options={{ headerTitle: null, animation: 'none' }} />
{/* <Stack.Screen name='SellersPage' component={SellersPage} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='cameraInterface' component={CameraInterface} options={{ headerTitle: null, animation: 'none' }} /> */}
{/* <Stack.Screen name='ImageEditingPage' component={ImageEditingPage} options={{ headerTitle: null, animation: 'none' }} /> */}
{/* <Stack.Screen name='ItemsDetail' component={ItemsDetail} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='CameraInterfaceForItem' component={CameraInterfaceForItem} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='SellerOrderList' component={SellerOrderList} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='OrderDetails' component={OrderDetails} options={{ headerTitle: null, animation: 'none' }} /> */}
<Stack.Screen name='BuyerSideComponents' component={BuyerInterface} options={{ headerTitle: null, animation: 'none' }} />
{/* <Stack.Screen name='Dashboard' component={Dashboard} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='Orders' component={Orders} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='Payment' component={Payment} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='FoodGallary' component={ShopGallary} options={{ headerTitle: null, animation: 'none' }} />
<Stack.Screen name='ShopePage' component={ShopePage} options={{ headerTitle: null, animation: 'none' }} /> */}
<Stack.Screen name='SignUp' component={SignUp} options={{ headerTitle: null, animation: 'none' }} />
</Stack.Navigator>
</NavigationContainer>
)
}