/** * ChatHeader -- Channel header showing the public channel name and description. * Generic styling (no Slack-specific prefixes like #). */ import { useChannels } from 'deepspace' import type { Channel } from 'deepspace' import type { RecordData } from 'deepspace' interface ChatHeaderProps { channelId: string onToggleThread?: () => void threadOpen?: boolean } export function ChatHeader({ channelId, onToggleThread, threadOpen }: ChatHeaderProps) { const { channels } = useChannels() const channel = channels.find((c: RecordData) => c.recordId === channelId) return (

{channel?.data.name ?? 'Chat'}

{channel?.data.description && ( <>
{channel.data.description} )}
{onToggleThread && (
)}
) }