import React from 'react'; import { useVoiceStore } from '../../stores/voiceStore'; const EMPTY_VOICE_USERS: string[] = []; import { useServerStore } from '../../stores/serverStore'; import { Avatar } from '../ui/Avatar'; interface VoiceChannelProps { channelId: string; channelName: string; onClick: () => void; } export function VoiceChannel({ channelId, channelName, onClick }: VoiceChannelProps) { const voiceUsers = useVoiceStore((s) => s.voiceUsers.get(channelId)) ?? EMPTY_VOICE_USERS; const currentVoiceChannel = useVoiceStore((s) => s.currentVoiceChannelId); const members = useServerStore((s) => s.members); const isActive = currentVoiceChannel === channelId; return (