-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
87 lines (84 loc) · 2.04 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
import React, { useState } from 'react';
import { NativeRouter, Route, useHistory } from 'react-router-native';
import HomeScreen from './screens/Home';
import Login from './screens/signIn';
import SignUp from './screens/SignUp';
import SearchScreen from './screens/Search';
import FavoritesScreen from './screens/Favorites';
import OrdersScreen from './screens/Orders';
import ProfileScreen from './screens/Profile';
import WelcomePage from './screens/Welcome';
import BottomTabBar from './components/BottomTabBar';
const App = () => {
const [clientData, setClientData] = useState();
return (
<NativeRouter>
<Route
exact
path='/'
render={() => <WelcomePage setClientData={setClientData} />}
/>
<Route
exact
path='/login'
render={() => <Login setClientData={setClientData} />}
/>
<Route
exact
path='/signup'
render={() => <SignUp setClientData={setClientData} />}
/>
<Route
exact
path='/home'
render={() => (
<>
<HomeScreen clientData={clientData} />
<BottomTabBar tab={0} />
</>
)}
/>
<Route
exact
path='/search'
render={() => (
<>
<SearchScreen clientData={clientData} />
<BottomTabBar tab={1} />
</>
)}
/>
<Route
exact
path='/favorites'
render={() => (
<>
<FavoritesScreen clientData={clientData} />
<BottomTabBar tab={2} />
</>
)}
/>
<Route
exact
path='/orders'
render={() => (
<>
<OrdersScreen clientData={clientData} />
<BottomTabBar tab={3} />
</>
)}
/>
<Route
exact
path='/profile'
render={() => (
<>
<ProfileScreen clientData={clientData} />
<BottomTabBar tab={4} />
</>
)}
/>
</NativeRouter>
);
};
export default App;