fix: add invite button, voice join dedup, voice panel immediate render

This commit is contained in:
2026-06-29 15:28:05 -04:00
parent a8a09cf7b4
commit 2d3bf48e66
3 changed files with 52 additions and 12 deletions
+9 -1
View File
@@ -15,12 +15,20 @@ export function VoiceChannel({ channelId, channelName }: VoiceChannelProps) {
const handleClick = () => {
if (!isActive) {
joinVoice(channelId, channelName);
console.log("[VoiceChannel] joining voice:", channelId, channelName);
joinVoice(channelId, channelName).catch((err) => {
console.error("[VoiceChannel] joinVoice failed:", err);
});
}
};
const error = useVoiceStore((state) => state.error);
return (
<div className="mb-0.5">
{error && (
<div className="px-2 py-0.5 text-gb-red text-xxs">! {error}</div>
)}
<button
onClick={handleClick}
className={`w-full text-left px-2 py-1 rounded-sm flex items-center gap-2 ${