Fix user page 404 padding being messed up

This commit is contained in:
Kalle
2023-09-16 11:52:12 +03:00
parent 2812b9c646
commit 6ea5742569

View File

@@ -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 (
<main