tosanoob's picture
Feature: frontend add update user
708809b
raw
history blame
1.63 kB
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();