Skip to content

Commit

Permalink
Merge pull request #41 from lugvitc/main
Browse files Browse the repository at this point in the history
chore: open results
  • Loading branch information
KreativeThinker authored Sep 6, 2024
2 parents 2092b54 + 1cc0371 commit e3115b8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import Login from "./pages/login";
// 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"
import Result from "./pages/results";

function ErrorBoundary() {
const error: any = useRouteError();
Expand All @@ -23,14 +23,14 @@ function ErrorBoundary() {
return (
<div className="flex justify-center items-center h-full w-full">
<div className="max-w-80">
<h1 className="text-7xl text-yellow-400 uppercase font-mono font-semibold italic">{error.status}</h1>
<p className="text-3xl">
{error.statusText}
</p>
<h1 className="text-7xl text-yellow-400 uppercase font-mono font-semibold italic">
{error.status}
</h1>
<p className="text-3xl">{error.statusText}</p>
<p className="font-mono">{error.data}</p>
</div>
</div>
)
);
}

const router = createBrowserRouter(
Expand All @@ -42,7 +42,7 @@ const router = createBrowserRouter(
{/* <Route path="apply" element={<Apply />} /> */}
<Route path="book" element={<Book />} />
<Route path="admin" element={<Level />} />
{/* <Route path="result" element={<Result />} /> */}
<Route path="result" element={<Result />} />
</Route>
</>,
),
Expand Down
19 changes: 16 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import "./index.scss";

export const rec_open = false;
export const booking = !rec_open && true;
export const results = !rec_open && !booking && false;
// export const results = !rec_open && !booking && false;
export const results = true;

export default function Root() {
// const txtsh = "0px 0px 2px rgb(250 204 21)";
Expand All @@ -33,10 +34,22 @@ export default function Root() {
) : null}
<Link
aria-disabled="true"
to="/apply"
to="/result"
className={
"rounded-md mt-4 text-xl text-center p-2 text-black font-semibold transition-all border" +
(!rec_open
(!results
? " bg-yellow-700 border-yellow-700 pointer-events-none"
: " bg-yellow-400 hover:bg-black hover:text-white border-yellow-400")
}
>
View Result
</Link>
<Link
aria-disabled="true"
to="/apply"
className={
"rounded-md hidden mt-4 text-xl text-center p-2 text-black font-semibold transition-all border" +
(rec_open
? " bg-yellow-700 border-yellow-700 pointer-events-none"
: " bg-yellow-400 hover:bg-black hover:text-white border-yellow-400")
}
Expand Down

0 comments on commit e3115b8

Please sign in to comment.