xonecas.io
5414
Sa

sat / files

sat / src / app / conversation / [id] / page.tsx

512 bytes
1import { notFound } from "next/navigation";
2import { getConversation } from "@/app/actions/conversations";
3import { Chat } from "@/components/chat";
4
5interface ConversationPageProps {
6  params: Promise<{ id: string }>;
7}
8
9export default async function ConversationPage({
10  params,
11}: ConversationPageProps) {
12  const { id } = await params;
13
14  // Verify the conversation exists
15  const conversation = await getConversation(id);
16  if (!conversation) {
17    notFound();
18  }
19
20  return <Chat conversationId={id} />;
21}