import { useEffect } from "react"; import { useChatStore } from "@/store"; import Icon from "../Icon"; import GitHubStarBadge from "../GitHubStarBadge"; interface Props { className?: string; } const Header = (props: Props) => { const { className } = props; const chatStore = useChatStore(); const currentChat = chatStore.currentChat; const title = currentChat?.title || "SQL Chat"; useEffect(() => { document.title = `${title} - SQL Chat`; }, [title]); return (
{title}
{title}
); }; export default Header;