diff --git a/src/App.tsx b/src/App.tsx index 10e3a9d..12c3447 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -3,26 +3,44 @@ import { createRoutesFromElements, Route, RouterProvider, + useRouteError, } from "react-router-dom"; import Root from "./pages"; import NavLayout from "./components/NavLayout"; import Login from "./pages/login"; -import Apply from "./pages/apply"; +// import Apply from "./pages/apply"; import { useEffect, useState } from "react"; import { supabase, SessionContext } from "./supabase"; -// import Book from "./pages/book" +import Book from "./pages/book" import Level from "./pages/level"; // import Result from "./pages/results" +function ErrorBoundary() { + const error: any = useRouteError(); + console.log(error); + + return ( +
+
+

{error.status}

+

+ {error.statusText} +

+

{error.data}

+
+
+ ) +} + const router = createBrowserRouter( createRoutesFromElements( <> - }> + } errorElement={}> } /> } /> - } /> - {/* } /> */} + {/* } /> */} + } /> } /> {/* } /> */} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 7895d80..c24d4bb 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -4,8 +4,8 @@ import Card from "../components/Card"; import "./index.scss"; -export const rec_open = true; -export const booking = !rec_open && false; +export const rec_open = false; +export const booking = !rec_open && true; export const results = !rec_open && !booking && false; export default function Root() { @@ -187,10 +187,10 @@ export default function Root() { {" "} only for Linux users? -

+

Though Linux is in the name, LUG represents more than just Linux. It embodies: -
    +
    • The principles of free and open-source software
    • Comprehensive tech education
    • @@ -198,7 +198,7 @@ export default function Root() { reason, sometimes not 😅)
    -

    +