diff --git a/app/components/Catcher.tsx b/app/components/Catcher.tsx
new file mode 100644
index 000000000..e48e1e26b
--- /dev/null
+++ b/app/components/Catcher.tsx
@@ -0,0 +1,35 @@
+import { useCatch } from "@remix-run/react";
+import { Button } from "~/components/Button";
+import { useUser } from "~/hooks/useUser";
+import { LOG_IN_URL, SENDOU_INK_DISCORD_URL } from "~/utils/urls";
+
+export function Catcher() {
+ const caught = useCatch();
+ const user = useUser();
+
+ switch (caught.status) {
+ case 401:
+ return (
+
+
401 Unauthorized
+ {user ? (
+
+ If you need assistance you can ask for help on{" "}
+
+ our Discord
+
+
+ ) : (
+
+ )}
+
+ );
+ }
+}
diff --git a/app/components/layout/index.tsx b/app/components/layout/index.tsx
index c5045d781..d4edb85ff 100644
--- a/app/components/layout/index.tsx
+++ b/app/components/layout/index.tsx
@@ -7,17 +7,12 @@ import { MobileMenu } from "./MobileMenu";
import { SearchInput } from "./SearchInput";
import { UserItem } from "./UserItem";
-interface LayoutProps {
- children: React.ReactNode;
- menuOpen: boolean;
- setMenuOpen: (open: boolean) => void;
-}
-
export const Layout = React.memo(function Layout({
children,
- menuOpen,
- setMenuOpen,
-}: LayoutProps) {
+}: {
+ children: React.ReactNode;
+}) {
+ const [menuOpen, setMenuOpen] = React.useState(false);
const matches = useMatches();
const pageTitleKey = "pageTitle";
@@ -39,6 +34,7 @@ export const Layout = React.memo(function Layout({
<>