import clsx from "clsx"; import type * as React from "react"; import { useMatches } from "react-router"; import { useUser } from "~/modules/auth"; import type { RootLoaderData } from "~/root"; export const Main = ({ children, className, classNameOverwrite, halfWidth, bigger, style, }: { children: React.ReactNode; className?: string; classNameOverwrite?: string; halfWidth?: boolean; bigger?: boolean; style?: React.CSSProperties; }) => { const data = useMatches()[0]?.data as RootLoaderData | undefined; const user = useUser(); const showLeaderboard = data?.publisherId && !user?.patronTier; return (
{children}
); };