Add Suspense fallback for loading states in multiple pages and layouts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
// app/(builder)/layout.tsx
|
||||
import type { ReactNode } from "react";
|
||||
import { Suspense } from "react";
|
||||
|
||||
import { AuthProvider } from "@/context/AuthContext";
|
||||
import { BuilderNav } from "@/components/BuilderNav";
|
||||
@@ -10,7 +11,9 @@ export default function BuilderLayout({ children }: { children: ReactNode }) {
|
||||
<div className="min-h-screen bg-neutral-950 text-zinc-50">
|
||||
<AuthProvider>
|
||||
<TopNav />
|
||||
<BuilderNav />
|
||||
<Suspense fallback={<div className="h-[52px]" />}>
|
||||
<BuilderNav />
|
||||
</Suspense>
|
||||
<main className="min-h-screen">{children}</main>
|
||||
</AuthProvider>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user