'use client';
import ChatSidebar from '@/layout/BasicLayout/components/ChatSidebar';
import { useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { useLayoutStore } from '@/stores';

export default function ChatPage() {
  const response = useLayoutStore((s) => s.response);
  const router = useRouter();

  useEffect(() => {
    if (response?.sm) {
      router.push('/home');
    }
  }, [response?.sm]);

  return (
    <div className="h-full">
      <ChatSidebar expand />
    </div>
  );
}
