[d7b7f00] | 1 | import React from 'react';
|
---|
| 2 | import { BrowserRouter as Router, Route, Routes } from 'react-router-dom';
|
---|
| 3 | import Register from './components/AuthenticationComponents/Register';
|
---|
| 4 | import Login from './components/AuthenticationComponents/Login';
|
---|
| 5 | import ProfileView from "./components/ProfileView";
|
---|
| 6 | import Home from "./components/Home";
|
---|
| 7 | import './css/index.css';
|
---|
| 8 | import Recipes from './components/RecipesComponents/Recipes';
|
---|
| 9 | import ApplicationForm from './components/ApplicationForm';
|
---|
| 10 | import RecipeCard from "./components/RecipesComponents/RecipeCard";
|
---|
| 11 | import About from "./components/About";
|
---|
| 12 | import AdminView from "./components/AdminView";
|
---|
| 13 | import DeliveryView from "./components/DeliveryView";
|
---|
| 14 | import { CartProvider } from './components/ShoppingCartComponents/CartContext';
|
---|
| 15 | import Checkout from './components/ShoppingCartComponents/Checkout';
|
---|
| 16 | import DeliveryDetails from './components/ShoppingCartComponents/DeliveryDetails';
|
---|
| 17 | import { OrderProvider } from './components/ShoppingCartComponents/OrderContext';
|
---|
| 18 | import OrderNotification from './components/ShoppingCartComponents/OrderNotification';
|
---|
| 19 | import DeliveryReview from './components/ShoppingCartComponents/DeliveryReview';
|
---|
| 20 | import RecipeApplication from "./components/RecipesComponents/RecipeApplication";
|
---|
| 21 |
|
---|
| 22 | const App = () => {
|
---|
| 23 | return (
|
---|
| 24 | <CartProvider>
|
---|
| 25 | <Router>
|
---|
| 26 | <OrderProvider>
|
---|
| 27 | <OrderNotification />
|
---|
| 28 | <Routes>
|
---|
| 29 | <Route path='/Register' element={<Register />} />
|
---|
| 30 | <Route path='/Login' element={<Login />} />
|
---|
| 31 | <Route path='/Profile' element={<ProfileView />} />
|
---|
| 32 | <Route path='/' element={<Home />} />
|
---|
| 33 | <Route path='/Recipes' element={<Recipes />} />
|
---|
| 34 | <Route path='/Apply' element={<ApplicationForm />} />
|
---|
| 35 | <Route path="/Recipes/:id" element={<RecipeCard />} />
|
---|
| 36 | <Route path="/about" element={<About />} />
|
---|
| 37 | <Route path="/admin" element={<AdminView />} />
|
---|
| 38 | <Route path="/deliver" element={<DeliveryView />} />
|
---|
| 39 | <Route path="/checkout" element={<Checkout />} />
|
---|
| 40 | <Route path="/delivery-details" element={<DeliveryDetails />} />
|
---|
| 41 | <Route path="/delivery-review" element={<DeliveryReview />} />
|
---|
| 42 | <Route path="/recipes/add" element={<RecipeApplication />}/>
|
---|
| 43 | <Route path="/loginSuccess" element={<Login />} />
|
---|
| 44 | </Routes>
|
---|
| 45 | </OrderProvider>
|
---|
| 46 | </Router>
|
---|
| 47 | </CartProvider>
|
---|
| 48 | );
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | export default App;
|
---|