feat(app): switch to useChat hook

This commit is contained in:
ItzCrazyKns
2025-08-20 20:21:06 +05:30
parent 8fc7808654
commit 0b15bfbe32
13 changed files with 68 additions and 759 deletions

View File

@@ -1,9 +1,17 @@
import ChatWindow from '@/components/ChatWindow';
import React from 'react';
'use client';
const Page = ({ params }: { params: Promise<{ chatId: string }> }) => {
const { chatId } = React.use(params);
return <ChatWindow id={chatId} />;
import ChatWindow from '@/components/ChatWindow';
import { useParams } from 'next/navigation';
import React from 'react';
import { ChatProvider } from '@/lib/hooks/useChat';
const Page = () => {
const { chatId }: { chatId: string } = useParams();
return (
<ChatProvider id={chatId}>
<ChatWindow />
</ChatProvider>
);
};
export default Page;