34 lines
600 B
TypeScript
34 lines
600 B
TypeScript
"use client"
|
|
|
|
import type React from "react"
|
|
|
|
import { Analytics } from "@vercel/analytics/next"
|
|
import { Suspense } from "react"
|
|
import { Toaster } from "@/components/ui/toaster"
|
|
|
|
function ClientLayoutContent({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode
|
|
}>) {
|
|
return (
|
|
<>
|
|
{children}
|
|
<Toaster />
|
|
<Analytics />
|
|
</>
|
|
)
|
|
}
|
|
|
|
export default function ClientLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode
|
|
}>) {
|
|
return (
|
|
<Suspense fallback={<div>Loading...</div>}>
|
|
<ClientLayoutContent>{children}</ClientLayoutContent>
|
|
</Suspense>
|
|
)
|
|
}
|