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: , errorElement: , }, { path: "/login", element: , errorElement: }, { path: "/register", element: , errorElement: }, { path: "/news", element: , errorElement: }, { path: "/menu", element: }, { path: "/cart", element: , errorElement: }, { path: "/userinfo", element: , errorElement: }, // admin section { path: "/admin", element: , errorElement: }, { path: "/admin-summary", element: , errorElement: }, { path: "/admin-feed", element: , errorElement: }, { path: "/admin-schedule", element: , errorElement: }, { path: "/admin-menu", element: , errorElement: }, { path: "/admin-staff", element: , errorElement: }, { path: "/admin-orders", element: , errorElement: }, { path: "/admin-login", element: , errorElement: }, { path:"/admin-info", element: , errorElement: }, { path:"/admin-news", element: , errorElement: }, { path:"/admin-branchs-list", element: , errorElement: }, { path:"/admin-branchs", element: , errorElement: }, { path:"/admin-menu-edit", element: , errorElement: } ]); const root = ReactDOM.createRoot(document.getElementById('root')); root.render( ); // 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();