2025-12-11 11:31:56 +00:00
|
|
|
'use client';
|
2025-12-09 09:13:46 +00:00
|
|
|
|
2025-12-11 11:31:56 +00:00
|
|
|
import { IconButton } from '@/components/ui/button';
|
|
|
|
|
import Input from './Input';
|
|
|
|
|
import MessageList from './MessageList';
|
|
|
|
|
import { useChatStore } from './store';
|
|
|
|
|
import Sider from './Sider';
|
2025-12-09 09:13:46 +00:00
|
|
|
|
|
|
|
|
export default function ChatPage() {
|
2025-12-11 11:31:56 +00:00
|
|
|
const isSidebarOpen = useChatStore((store) => store.isSidebarOpen);
|
|
|
|
|
const setIsSidebarOpen = useChatStore((store) => store.setIsSidebarOpen);
|
2025-12-09 09:13:46 +00:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex h-full">
|
2025-12-15 11:31:18 +00:00
|
|
|
<div className="relative px-4 w-full flex-1 flex justify-center">
|
2025-12-09 09:13:46 +00:00
|
|
|
<div className="max-w-[752px] w-full h-full flex flex-col">
|
|
|
|
|
<MessageList />
|
|
|
|
|
<Input />
|
|
|
|
|
</div>
|
|
|
|
|
<IconButton
|
|
|
|
|
onClick={() => setIsSidebarOpen(!isSidebarOpen)}
|
|
|
|
|
className="absolute top-1 right-1"
|
|
|
|
|
variant="ghost"
|
|
|
|
|
size="small"
|
|
|
|
|
>
|
|
|
|
|
<i className="iconfont-v2 iconv2-zhedie" />
|
|
|
|
|
</IconButton>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{isSidebarOpen && <Sider />}
|
|
|
|
|
</div>
|
2025-12-11 11:31:56 +00:00
|
|
|
);
|
2025-12-09 09:13:46 +00:00
|
|
|
}
|