Add Suspense fallback for loading states in multiple pages and layouts

This commit is contained in:
2026-01-20 07:43:19 -05:00
parent 775a351425
commit 3ab697b58d
7 changed files with 94 additions and 13 deletions
+4 -2
View File
@@ -1,16 +1,18 @@
// app/(builder)/layout.tsx
import type { ReactNode } from "react";
import { Suspense } from "react";
import { BuilderNav } from "@/components/BuilderNav";
import { TopNav } from "@/components/TopNav";
import { Import } from "lucide-react";
import { Footer } from "@/components/Footer";
export default function BuilderLayout({ children }: { children: ReactNode }) {
return (
<div className="min-h-screen bg-white text-zinc-900 dark:bg-neutral-950 dark:text-zinc-50">
<TopNav />
<BuilderNav />
<Suspense fallback={<div className="h-[52px]" />}>
<BuilderNav />
</Suspense>
<main className="min-h-screen">{children}</main>
<Footer />
</div>