diff --git a/app/components/FourOhFour.tsx b/app/components/FourOhFour.tsx index 9e98da6..e856bc5 100644 --- a/app/components/FourOhFour.tsx +++ b/app/components/FourOhFour.tsx @@ -7,69 +7,71 @@ export default function FourOhFour() { if (isRouteErrorResponse(error)) { return ( -

Error {error.status}

-

{error.statusText}

-

- If you believe you reached this page in error, please file an issue{" "} - Error {error.status}

+

{error.data}

+

+ If you believe you reached this page in error, please file an issue{" "} + + here + +

+ - here - - - - Back to Home - -
+ Back to Home + + ); } else if (error instanceof Error) { return ( - -

Error 500

-

- If you believe you reached this page in error, please file an issue{" "} - +

Error {error.name}

+

Error {error.message}

+ +

+ If you believe you reached this page in error, please file an issue{" "} + + here + +

+ - here - -

- - Back to Home - -
+ Back to Home + + ); } else { - return( - -

Error {error.status}

-

{error.statusText}

-

- If you believe you reached this page in error, please file an issue{" "} - +

Error 500

+

+ If you believe you reached this page in error, please file an issue{" "} + + here + +

+ - here - -

- - Back to Home - -
) + Back to Home + + + ); } } diff --git a/app/routes/room.$roomId.tsx b/app/routes/room.$roomId.tsx index d7e7c8c..da778bb 100644 --- a/app/routes/room.$roomId.tsx +++ b/app/routes/room.$roomId.tsx @@ -27,7 +27,6 @@ import { useUser } from "@clerk/remix"; import { db } from "~/services/db.server"; import { rooms } from "~/services/schema"; import { eq } from "drizzle-orm"; -import { shitList } from "~/services/consts.server"; import FourOhFour from "~/components/FourOhFour"; import { isShit } from "~/services/helpers.server"; @@ -44,21 +43,25 @@ export const loader: LoaderFunction = async (args) => { }); if (!room) { - throw new Response(null, { - status: 404, - statusText: - "Oops! This room does not appear to exist, or may have been deleted!", - }); + throw new Response( + "Oops! This room does not appear to exist, or may have been deleted!", + { + status: 404, + statusText: "NOT FOUND", + } + ); } const email = sessionClaims.email as string; - - if (isShit(email)) { - throw new Response(null, { - status: 404, - statusText: - "Wowee zowee! I'm sure I put that room around here somewhere...", - }); + const shit = isShit(email); + if (shit) { + throw new Response( + "Wowee zowee! I'm sure I put that room around here somewhere...", + { + status: 404, + statusText: "NOT FOUND", + } + ); } return {}; diff --git a/app/services/consts.server.ts b/app/services/consts.server.ts deleted file mode 100644 index 9c107f2..0000000 --- a/app/services/consts.server.ts +++ /dev/null @@ -1 +0,0 @@ -export const shitList = ["ama.ab.ca"];