upgrade to next.js 16 (#1334)

This commit is contained in:
josh 2025-11-29 13:21:34 +00:00 committed by GitHub
parent a3802348fa
commit e90a6ee209
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 272 additions and 247 deletions

View file

@ -1,5 +1,6 @@
import { cookies } from "next/headers";
import { notFound, redirect } from "next/navigation";
import { Suspense } from "react";
import { auth } from "@/app/(auth)/auth";
import { Chat } from "@/components/chat";
@ -8,9 +9,16 @@ import { DEFAULT_CHAT_MODEL } from "@/lib/ai/models";
import { getChatById, getMessagesByChatId } from "@/lib/db/queries";
import { convertToUIMessages } from "@/lib/utils";
export default async function Page(props: { params: Promise<{ id: string }> }) {
const params = await props.params;
const { id } = params;
export default function Page(props: { params: Promise<{ id: string }> }) {
return (
<Suspense fallback={<div className="flex h-dvh" />}>
<ChatPage params={props.params} />
</Suspense>
);
}
async function ChatPage({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const chat = await getChatById({ id });
if (!chat) {