"use client"; import { useEffect } from "react"; import { useChatStore } from "@/lib/store"; import { Sidebar } from "@/components/layout/Sidebar"; import { Header } from "@/components/layout/Header"; import { ChatWindow } from "./ChatWindow"; import { ChatInput } from "./ChatInput"; import { SkipToContent } from "@/components/a11y/SkipToContent"; import { AnnouncerProvider } from "@/components/a11y/Announcer"; export function ChatLayout() { const { conversations, createConversation, activeConversationId } = useChatStore(); useEffect(() => { if (conversations.length === 0) { createConversation(); } }, []); return (
{activeConversationId ? ( <> ) : (
Select or create a conversation
)}
); }