diff --git a/components/client-boundary.tsx b/components/client-boundary.tsx new file mode 100644 index 0000000..7581ad0 --- /dev/null +++ b/components/client-boundary.tsx @@ -0,0 +1,16 @@ +'use client'; + +import { Suspense } from 'react'; + +interface ClientBoundaryProps { + children: React.ReactNode; + fallback?: React.ReactNode; +} + +export function ClientBoundary({ children, fallback }: ClientBoundaryProps) { + return ( + Loading...}> + {children} + + ); +} diff --git a/components/root-layout.tsx b/components/root-layout.tsx index 93f64a4..28f22a8 100644 --- a/components/root-layout.tsx +++ b/components/root-layout.tsx @@ -5,14 +5,15 @@ import "@/styles/mdx.css" import Navbar from "@/components/navbar" import { LoadingScreen } from "@/components/loading-screen" import { usePageView } from "@/hooks/use-page-view" +import { ClientBoundary } from "./client-boundary" const geistSans = localFont({ - src: "../app/fonts/GeistVF.woff", + src: "./fonts/GeistVF.woff", variable: "--font-geist-sans", }) const geistMono = localFont({ - src: "../app/fonts/GeistMonoVF.woff", + src: "./fonts/GeistMonoVF.woff", variable: "--font-geist-mono", }) @@ -25,12 +26,14 @@ export function RootLayoutClient({ usePageView() return ( -
- - -
- {children} -
-
+ +
+ + +
+ {children} +
+
+
) }