fix(chat): wrap chat page in Suspense boundary for Next.js static export

This commit is contained in:
Ishaan Jaffer 2026-03-05 18:41:18 -08:00
parent 79b3efae07
commit 5c0dc19455

View file

@ -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;