Spaces:
Sleeping
Sleeping
File size: 4,227 Bytes
391b583 fab48db 0dd6a66 fab48db 0d37b12 391b583 0d37b12 fab48db 0d37b12 0dd6a66 fab48db 0dd6a66 fdbdf19 0dd6a66 fdbdf19 0d37b12 0dd6a66 0d37b12 fab48db 391b583 0dd6a66 391b583 |
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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
import React from 'react';
import ReactDOM from 'react-dom/client';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import 'bootstrap/dist/css/bootstrap.min.css';
import './styles/index.css';
import './styles/styles.css';
import ErrorPage from './pages/ErrorPage';
import HomePage from './pages/user-pages/HomePage';
import reportWebVitals from './reportWebVitals';
import LoginPage from './pages/user-pages/LoginPage';
import RegisterPage from './pages/user-pages/RegisterPage';
import NewsPage from './pages/user-pages/NewsPage';
import MenuPage from './pages/user-pages/MenuPage';
import CartPage from './pages/user-pages/CartPage';
import UserInfoPage from './pages/user-pages/UserInfoPage';
import AdminSummaryPage from './pages/admin-pages/AdminSummaryPage';
import AdminFeedPage from './pages/admin-pages/AdminFeedPage';
import AdminMenuPage from './pages/admin-pages/AdminMenuPage';
import AdminStaffPage from './pages/admin-pages/AdminStaffPage';
import AdminOrderPage from './pages/admin-pages/AdminOrderPage';
import AdminSchedulePage from './pages/admin-pages/AdminSchedulePage';
import AdminLoginPage from './pages/admin-pages/AdminLoginPage';
import AdminUserInfoPage from './pages/admin-pages/AdminUserInfoPage';
import AdminNewsEditPage from './pages/admin-pages/AdminNewsEditPage';
import AdminBranchPage from './pages/admin-pages/AdminBranchesPage';
import AdminBranchEditPage from './pages/admin-pages/AdminBranchesEditPage';
import AdminMenuEditPage from './pages/admin-pages/AdminMenuEditPage';
const router = createBrowserRouter([
{
path: "/",
element: <HomePage />,
errorElement: <ErrorPage />,
},
{
path: "/login",
element: <LoginPage />,
errorElement: <ErrorPage />
},
{
path: "/register",
element: <RegisterPage />,
errorElement: <ErrorPage />
},
{
path: "/news",
element: <NewsPage />,
errorElement: <ErrorPage />
},
{
path: "/menu",
element: <MenuPage />
},
{
path: "/cart",
element: <CartPage />,
errorElement: <ErrorPage />
},
{
path: "/userinfo",
element: <UserInfoPage />,
errorElement: <ErrorPage />
},
// admin section
{
path: "/admin",
element: <AdminSummaryPage />,
errorElement: <ErrorPage />
},
{
path: "/admin-summary",
element: <AdminSummaryPage />,
errorElement: <ErrorPage />
},
{
path: "/admin-feed",
element: <AdminFeedPage />,
errorElement: <ErrorPage />
},
{
path: "/admin-schedule",
element: <AdminSchedulePage />,
errorElement: <ErrorPage />
},
{
path: "/admin-menu",
element: <AdminMenuPage />,
errorElement: <ErrorPage />
},
{
path: "/admin-staff",
element: <AdminStaffPage />,
errorElement: <ErrorPage />
},
{
path: "/admin-orders",
element: <AdminOrderPage />,
errorElement: <ErrorPage />
},
{
path: "/admin-login",
element: <AdminLoginPage />,
errorElement: <ErrorPage />
},
{
path:"/admin-info",
element: <AdminUserInfoPage/>,
errorElement: <ErrorPage/>
},
{
path:"/admin-news",
element: <AdminNewsEditPage/>,
errorElement: <ErrorPage/>
},
{
path:"/admin-branchs-list",
element: <AdminBranchPage/>,
errorElement: <ErrorPage/>
},
{
path:"/admin-branchs",
element: <AdminBranchEditPage/>,
errorElement: <ErrorPage/>
},
{
path:"/admin-menu-edit",
element: <AdminMenuEditPage/>,
errorElement: <ErrorPage/>
}
]);
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<RouterProvider router={router} />
</React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
|