From 54e7433a5c36b6dbc9cd802fca40270374d51e15 Mon Sep 17 00:00:00 2001 From: Andrea Date: Tue, 5 Nov 2024 22:06:28 +0100 Subject: [PATCH] fixes --- app/root.tsx | 70 ++++++++++++++++---------------------- app/routes/blog.$file.tsx | 4 +-- app/routes/blog._index.tsx | 4 +-- 3 files changed, 33 insertions(+), 45 deletions(-) diff --git a/app/root.tsx b/app/root.tsx index 3c887ff..fcf52cc 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -32,7 +32,7 @@ export const meta: MetaFunction = () => [ }, ]; -export default function App() { +export function Layout({ children }: React.PropsWithChildren) { return ( @@ -51,7 +51,7 @@ export default function App() { /> - + {children} @@ -59,55 +59,43 @@ export default function App() { ); } +export default function App() { + return ; +} + export function ErrorBoundary() { const error = useRouteError(); if (isRouteErrorResponse(error)) { return ( - - - - - - -
-
-
- 404 -
-
Where do you think you are going?
-
- - Home - -
-
+
+
+
+ 404
- - +
Where do you think you are going?
+
+ + Home + +
+
+
); } return ( - - - - - - -
-
-
- Something bad happened -
-
- - Home - -
-
+
+
+
+ Something bad happened
- - +
+ + Home + +
+
+
); } diff --git a/app/routes/blog.$file.tsx b/app/routes/blog.$file.tsx index 9c83f3e..44d753c 100644 --- a/app/routes/blog.$file.tsx +++ b/app/routes/blog.$file.tsx @@ -56,7 +56,7 @@ export default function Post() { const MdxComponent = React.useMemo(() => getMDXComponent(code), [code]); return ( - <> +
{title} @@ -92,6 +92,6 @@ export default function Post() {
- +
); } diff --git a/app/routes/blog._index.tsx b/app/routes/blog._index.tsx index eb92d09..c79173f 100644 --- a/app/routes/blog._index.tsx +++ b/app/routes/blog._index.tsx @@ -12,7 +12,7 @@ export default function Blog() { const posts = useLoaderData(); return ( - <> +
Home @@ -22,6 +22,6 @@ export default function Blog() { ))}
- + ); }