From fb415a9140282abb5989c3ff97da4dab55d19a7d Mon Sep 17 00:00:00 2001 From: selankon Date: Wed, 3 Jul 2024 12:55:17 +0200 Subject: [PATCH 1/2] Wrap RouteError into default Layout --- src/layout/Default.tsx | 7 +++---- src/router/index.tsx | 8 ++++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/layout/Default.tsx b/src/layout/Default.tsx index 97f8c62..a630805 100644 --- a/src/layout/Default.tsx +++ b/src/layout/Default.tsx @@ -1,4 +1,5 @@ import { Box, BoxProps, Grid } from '@chakra-ui/react' +import { PropsWithChildren } from 'react' import { Outlet, ScrollRestoration } from 'react-router-dom' import { Footer } from '~components/Layout/Footer' import { TopBar } from '~components/Layout/TopBar' @@ -16,14 +17,12 @@ const DefaultLayout = (props: BoxProps) => ( /> ) -const Layout = () => ( +const Layout = ({ children }: PropsWithChildren) => ( - - - + {children ?? }