fix: add invite button, voice join dedup, voice panel immediate render
This commit is contained in:
@@ -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 ${
|
||||
|
||||
Reference in New Issue
Block a user