import type { LivestreamStore } from "@streamplace/core"; import { ExternalLink } from "lucide-react"; import { useTranslation } from "react-i18next"; import { useStore } from "zustand"; import { useShallow } from "zustand/react/shallow"; import { SidebarContent, SidebarFooter, SidebarHeader } from "../ui/sidebar"; import { ChatInput } from "./chat-input"; import { ChatPanel } from "./chat-panel"; import { StreamNotifications } from "./stream-notifications"; export function ChatSidebar({ store, onClose, avatar, }: { store: LivestreamStore; onClose?: () => void; avatar?: string; }) { const { t } = useTranslation("common"); const state = useStore( store, useShallow((s) => ({ livestream: s.livestream, viewers: s.viewers, })), ); const author = state.livestream?.author; return (
Stream Chat
{onClose && ( )}
); }