-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathApp.js
66 lines (58 loc) · 2.83 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
import './App.css';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom'
import HomePage from './Pages/Home/HomePage';
import Login from './Auth/Login/Login';
import Register from './Auth/Register/Register';
import Cart from './Pages/Cart/Cart';
import ProductDetail from './Pages/Detail/ProductDetail';
import SingleCategory from './SingleCategory/SingleCategory';
import MobileNavigation from './Navigation/MobileNavigation';
import DesktopNavigation from './Navigation/DesktopNavigation';
import Wishlist from './Pages/WhisList/Wishlist';
import PaymentSuccess from './Pages/Payment/PaymentSuccess';
import { Flip, ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import CheckoutForm from './Components/Checkout/CheckoutForm';
import UpdateDetails from './Pages/Update_User/UpdateDetails';
import ForgotPasswordForm from './Auth/ForgotPassword/ForgotPasswordForm';
import AddNewPassword from './Auth/ForgotPassword/AddNewPassword';
import AdminLogin from './Admin/Auth/Login/AdminLogin';
import AdminRegister from './Admin/Auth/Register/AdminRegister';
import AdminHomePage from './Admin/Pages/AdminHomePage';
import SingleUserPage from './Admin/Pages/SingleUserPage';
import SingleProduct from './Admin/Pages/SingleProduct';
function App() {
return (
<>
<ToastContainer toastClassName='toastContainerBox' transition={Flip} position='top-center' />
<Router>
<DesktopNavigation />
<div className='margin'>
<Routes>
{/*User Routes */}
<Route path='/' index element={<HomePage />} />
<Route path="/login" element={< Login />} />
<Route path='/register' element={<Register />} />
<Route path='/Detail/type/:cat/:id' element={<ProductDetail />} />
<Route path='product/type/:cat' element={<SingleCategory />} />
<Route path='/cart' element={<Cart />} />
<Route path='/wishlist' element={<Wishlist />} />
<Route path='/checkout' element={<CheckoutForm />} />
<Route path='/update' element={<UpdateDetails />} />
<Route path='/paymentsuccess' element={<PaymentSuccess />} />
<Route path='/forgotpassword' element={<ForgotPasswordForm />} />
<Route path='/user/reset/:id/:token' element={<AddNewPassword />} />
{/* Admin Routes */}
<Route path="/admin/login" element={< AdminLogin />} />
<Route path='/admin/register' element={<AdminRegister />} />
<Route path='/admin/home' element={<AdminHomePage />} />
<Route path='/admin/home/user/:id' element={<SingleUserPage />} />
<Route path='/admin/home/product/:type/:id' element={<SingleProduct />} />
</Routes>
</div>
<MobileNavigation />
</Router >
</>
);
}
export default App;