fix(voice): live connection state instead of static SSR snapshot
- VoiceView now reads connected/activeChannelName from useVoiceStatus (SWR live, invalidated by connect/disconnect) instead of initialStatus - Seed useSpeakers from live status.activeSpeakers - Add 4s refreshInterval to useVoiceStatus so state converges (tsc clean, next build green)
This commit is contained in:
@@ -24,6 +24,7 @@ export function useVoiceStatus(initialData?: VoiceStatus) {
|
||||
return useSWR<VoiceStatus>(STATUS_KEY, () => voiceApi.getStatus(), {
|
||||
shouldRetryOnError: false,
|
||||
fallbackData: initialData,
|
||||
refreshInterval: 4000,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user