mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix(chat): wrap chat page in Suspense boundary for Next.js static export
This commit is contained in:
parent
79b3efae07
commit
5c0dc19455
1 changed files with 9 additions and 1 deletions
|
|
@ -1,9 +1,11 @@
|
|||
"use client";
|
||||
|
||||
import { Suspense } from "react";
|
||||
import useAuthorized from "@/app/(dashboard)/hooks/useAuthorized";
|
||||
import ChatPage from "@/components/chat/ChatPage";
|
||||
|
||||
const ChatPageRoute = () => {
|
||||
// ChatPage uses useSearchParams() which requires a Suspense boundary for static export.
|
||||
const ChatPageContent = () => {
|
||||
const { accessToken, userRole, userId, userEmail } = useAuthorized();
|
||||
|
||||
return (
|
||||
|
|
@ -16,4 +18,10 @@ const ChatPageRoute = () => {
|
|||
);
|
||||
};
|
||||
|
||||
const ChatPageRoute = () => (
|
||||
<Suspense>
|
||||
<ChatPageContent />
|
||||
</Suspense>
|
||||
);
|
||||
|
||||
export default ChatPageRoute;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue