'use client';
import { useMedia } from '@/hooks/tools';
import ChatSidebar from '@/layout/components/ChatSidebar';
import { useEffect } from 'react';
import { useRouter } from 'next/navigation';

export default function ChatPage() {
  const response = useMedia();
  const router = useRouter();

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

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