-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.jsx
31 lines (26 loc) · 839 Bytes
/
App.jsx
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
import React, { useState } from 'react'
import Navbar from './components/Navbar/Navbar'
import { Route, Routes } from 'react-router-dom'
import Home from './pages/Home/Home'
import Cart from './pages/Cart/Cart'
import PlaceOrder from './pages/PlaceOrder/PlaceOrder'
import Footer from './components/Footer/Footer'
import LoginPopup from './components/LoginPopup/LoginPopup'
const App = () => {
const [showLogin, setShowLogin] = useState(false)
return (
<>
{showLogin?<LoginPopup setShowLogin={setShowLogin}/>:<></>}
<div className="app">
<Navbar setShowLogin={setShowLogin}/>
<Routes>
<Route path='/' element={<Home/>}/>
<Route path='/Cart' element={<Cart/>}/>
<Route path='/Order' element={<PlaceOrder/>}/>
</Routes>
</div>
<Footer />
</>
)
}
export default App