diff --git a/app/components/layout/index.tsx b/app/components/layout/index.tsx index 6567fe501..5524b8ad5 100644 --- a/app/components/layout/index.tsx +++ b/app/components/layout/index.tsx @@ -11,9 +11,11 @@ import type { RootLoaderData } from "~/root"; export const Layout = React.memo(function Layout({ children, patrons, + isCatchBoundary = false, }: { children: React.ReactNode; patrons?: RootLoaderData["patrons"]; + isCatchBoundary?: boolean; }) { const location = useLocation(); const [menuOpen, setMenuOpen] = React.useState(false); @@ -40,7 +42,7 @@ export const Layout = React.memo(function Layout({
)}
- + {!isCatchBoundary ? : null} setMenuOpen(!menuOpen)} diff --git a/app/root.tsx b/app/root.tsx index d9d0e08f6..2ba3d3c9d 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -70,9 +70,11 @@ export const loader: LoaderFunction = async ({ request }) => { function Document({ children, patrons, + isCatchBoundary, }: { children: React.ReactNode; patrons?: RootLoaderData["patrons"]; + isCatchBoundary?: boolean; }) { return ( @@ -83,7 +85,9 @@ function Document({ - {children} + + {children} + @@ -105,10 +109,9 @@ export default function App() { ); } -// TODO: this shows user as logged out even if they are logged in - a bit awkward with 404's export function CatchBoundary() { return ( - + );