'use client';

import { useAtomValue } from 'jotai';
import { isPortraitModeAtom } from '../atoms';
import ChatMessageList from './components/ChatMessageList';
import PortraitChat from './components/PortraitChat';

export default function ChatList() {
  const isPortraitMode = useAtomValue(isPortraitModeAtom);

  return (
    <div className="mb-10 flex-1">
      {isPortraitMode ? <PortraitChat /> : <ChatMessageList />}
    </div>
  );
}
