import { useCatch } from "@remix-run/react"; import { Button } from "~/components/Button"; import { useUser } from "~/modules/auth"; import { ERROR_GIRL_IMAGE_PATH, LOG_IN_URL, SENDOU_INK_DISCORD_URL, } from "~/utils/urls"; import { Image } from "./Image"; import { Main } from "./Main"; export function Catcher() { const caught = useCatch(); const user = useUser(); if (!caught) return (

Error happened

It seems like you encountered a bug. Sorry about that! Please report details (your browser? what were you doing?) on{" "} our Discord so it can be fixed.

); switch (caught.status) { case 401: return (

Error 401 Unauthorized

{user ? ( ) : (

You should try{" "}

)}
); case 404: return (

Error {caught.status} - Page not found

); default: return (

Error {caught.status}

Please include the message below if any and an explanation on what you were doing:
{caught.data ? (
{JSON.stringify(JSON.parse(caught.data), null, 2)}
) : null}
); } } function GetHelp() { return (

If you need assistance you can ask for help on{" "} our Discord

); }