From 6ea5742569f4aedbe9ce8962824f54a02b96de79 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 16 Sep 2023 11:52:12 +0300 Subject: [PATCH] Fix user page 404 padding being messed up --- app/components/Main.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/components/Main.tsx b/app/components/Main.tsx index 0d68eb5f6..7c2ab685c 100644 --- a/app/components/Main.tsx +++ b/app/components/Main.tsx @@ -1,3 +1,4 @@ +import { useCatch } from "@remix-run/react"; import clsx from "clsx"; import type * as React from "react"; import { useMatches } from "react-router"; @@ -19,9 +20,10 @@ export const Main = ({ bigger?: boolean; style?: React.CSSProperties; }) => { + const caught = useCatch(); const data = useMatches()[0]?.data as RootLoaderData | undefined; const user = useUser(); - const showLeaderboard = data?.publisherId && !user?.patronTier; + const showLeaderboard = data?.publisherId && !user?.patronTier && !caught; return (