File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 11import "./globals.css" ;
22
33import { Databuddy } from "@databuddy/sdk/react" ;
4+ import { SpinnerIcon } from "@phosphor-icons/react/dist/ssr" ;
45import type { Metadata , Viewport } from "next" ;
56import { Geist , Geist_Mono } from "next/font/google" ;
7+ import { Suspense } from "react" ;
68import { Toaster } from "@/components/ui/sonner" ;
79import Providers from "./providers" ;
810
@@ -130,7 +132,15 @@ export default function RootLayout({
130132 />
131133 < body className = "flex h-full min-h-screen flex-col bg-background text-foreground antialiased" >
132134 < Providers >
133- < main className = "flex-1" > { children } </ main >
135+ < Suspense
136+ fallback = {
137+ < div className = "flex h-full items-center justify-center p-8" >
138+ < SpinnerIcon className = "size-8 animate-spin text-primary" />
139+ </ div >
140+ }
141+ >
142+ < main className = "flex-1" > { children } </ main >
143+ </ Suspense >
134144 </ Providers >
135145 < Toaster />
136146 </ body >
You can’t perform that action at this time.
0 commit comments