Spaces:
Sleeping
Sleeping
File size: 1,633 Bytes
391b583 fab48db 391b583 fab48db 391b583 fab48db 708809b fab48db 708809b fab48db 391b583 fab48db 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 |
import React from 'react';
import ReactDOM from 'react-dom/client';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import './styles/index.css';
import 'bootstrap/dist/css/bootstrap.min.css';
import ErrorPage from './pages/ErrorPage';
import HomePage from './pages/HomePage';
import reportWebVitals from './reportWebVitals';
import LoginPage from './pages/LoginPage';
import RegisterPage from './pages/RegisterPage';
import NewsPage from './pages/NewsPage';
import MenuPage from './pages/MenuPage';
import CartPage from './pages/CartPage';
import UserInfoPage from './pages/UserInfoPage';
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/>
}
]);
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();
|