Skip to content

Commit 4b31e08

Browse files
committed
feat: wrap MixpanelInit in Suspense for improved loading handling
1 parent bb1ae23 commit 4b31e08

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app/layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Metadata } from "next";
2+
import { Suspense } from "react";
23
import { Geist, Geist_Mono } from "next/font/google";
34
import "./globals.css";
45
import { ThemeProvider } from "@/components/theme-provider";
@@ -76,7 +77,9 @@ export default function RootLayout({
7677
enableSystem
7778
disableTransitionOnChange
7879
>
79-
<MixpanelInit />
80+
<Suspense fallback={null}>
81+
<MixpanelInit />
82+
</Suspense>
8083
{children}
8184
</ThemeProvider>
8285
</body>

0 commit comments

Comments
 (0)