import * as React from "react"; import * as ReactDOM from "react-dom/client"; import { createBrowserRouter, RouterProvider } from "react-router-dom"; import "./index.css"; import Root, { loader as rootLoader, action as rootAction, } from "./routes/root"; import ErrorPage from "./error-page"; import Contact, { loader as contactLoader, action as contactAction, } from "./routes/contact"; import EditContact, { action as editAction } from "./routes/edit"; import { action as destroyAction } from "./routes/destroy"; import Index from "./routes"; import { AuthProvider } from "./providers/AuthProvider"; const router = createBrowserRouter([ { path: "/", element: , loader: rootLoader, action: rootAction, errorElement: , children: [ { errorElement: , children: [ { index: true, element: }, { path: "contacts/:contactId", element: , loader: contactLoader, action: contactAction, }, { path: "contacts/:contactId/edit", element: , loader: contactLoader, action: editAction, }, { path: "contacts/:contactId/destroy", action: destroyAction, errorElement:
Oops! There was an error.
, }, ], }, ], }, { path: "contacts/:contactId", element: , }, ]); ReactDOM.createRoot(document.getElementById("root")).render( );