chessh/front/src/index.js
Elizabeth (Lizzy) Hunt eec32aa38a
Bots (#23)
* squash all the things for bots

* fix warnings

* change colors a bit and README updates

* fix frontend warnings
2023-05-29 16:28:27 -07:00

58 lines
1.3 KiB
JavaScript

import React from "react";
import ReactDOM from "react-dom/client";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import { AuthProvider } from "./context/auth_context";
import { Root } from "./root";
import { Demo } from "./routes/demo";
import { Home } from "./routes/home";
import { Keys } from "./routes/keys";
import { Bots } from "./routes/bots";
import { ManPages } from "./routes/man_pages";
import { Password } from "./routes/password";
import { AuthSuccessful } from "./routes/auth_successful";
import "./index.css";
const router = createBrowserRouter([
{ path: "/", element: <Demo /> },
{
path: "/",
element: <Root />,
errorElement: <> </>,
children: [
{
path: "home",
element: <Home />,
},
{
path: "password",
element: <Password />,
},
{
path: "keys",
element: <Keys />,
},
{
path: "auth-successful",
element: <AuthSuccessful />,
},
{
path: "bots",
element: <Bots />,
},
{
path: "man-pages",
element: <ManPages />,
},
],
},
]);
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<AuthProvider>
<RouterProvider router={router} />
</AuthProvider>
);