fix(moltbot): wrap MoltbotChat in Suspense to fix build error
Wraps the `MoltbotChat` client component in a `Suspense` boundary in `src/app/services/moltbot/chats/page.tsx`. This resolves the `useSearchParams()` error during static site generation, ensuring the build completes successfully. Co-authored-by: cloud-neutral <4133689+cloud-neutral@users.noreply.github.com>
This commit is contained in:
parent
ed509101a4
commit
c1005c4752
@ -1,3 +1,4 @@
|
|||||||
|
import { Suspense } from 'react'
|
||||||
import { MoltbotChat } from './MoltbotChat'
|
import { MoltbotChat } from './MoltbotChat'
|
||||||
|
|
||||||
export const metadata = {
|
export const metadata = {
|
||||||
@ -8,7 +9,9 @@ export const metadata = {
|
|||||||
export default function MoltbotPage() {
|
export default function MoltbotPage() {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto max-w-4xl py-8">
|
<div className="container mx-auto max-w-4xl py-8">
|
||||||
<MoltbotChat />
|
<Suspense fallback={<div className="flex h-[50vh] items-center justify-center text-slate-400">Loading chat...</div>}>
|
||||||
|
<MoltbotChat />
|
||||||
|
</Suspense>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user