修正 vercal 佈署失敗問題
This commit is contained in:
@@ -3,22 +3,31 @@
|
||||
import type React from "react"
|
||||
|
||||
import { Analytics } from "@vercel/analytics/next"
|
||||
import { useSearchParams } from "next/navigation"
|
||||
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
|
||||
}>) {
|
||||
const searchParams = useSearchParams()
|
||||
|
||||
return (
|
||||
<>
|
||||
<Suspense fallback={<div>Loading...</div>}>{children}</Suspense>
|
||||
<Toaster />
|
||||
<Analytics />
|
||||
</>
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<ClientLayoutContent>{children}</ClientLayoutContent>
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user