import React from "react";
import ReactDOM from "react-dom/client";
import HomeRoute from "./routes/HomeRoute";
import AboutRoute from "./routes/AboutRoute";
import AwardsRoute from "./routes/AwardsRoute";
import reportWebVitals from "./reportWebVitals";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import ErrorRoute from "./routes/ErrorRoute";

const root = ReactDOM.createRoot(document.getElementById("root"));

const router = createBrowserRouter([
  {
    path: "/",
    element: <HomeRoute></HomeRoute>,
    errorElement: <ErrorRoute></ErrorRoute>,
  },
  {
    path: "/about",
    element: <AboutRoute></AboutRoute>,
    errorElement: <ErrorRoute></ErrorRoute>,
  },
  {
    path: "/awards",
    element: <AwardsRoute></AwardsRoute>,
    errorElement: <ErrorRoute></ErrorRoute>,
  }
]);

root.render(<RouterProvider router={router}></RouterProvider>);

reportWebVitals();
