fixed dispatch eslint errors

This commit is contained in:
PxlLoewe
2025-07-10 00:35:34 -07:00
parent eec72a51b8
commit a9a4f1617a
47 changed files with 396 additions and 185 deletions

View File

@@ -65,7 +65,7 @@ export const useAudioStore = create<TalkState>((set, get) => ({
const newSpeaktingParticipants = get().speakingParticipants.filter(
(p) => !(p.identity === participant.identity),
);
set((state) => ({
set(() => ({
speakingParticipants: newSpeaktingParticipants,
}));
if (newSpeaktingParticipants.length === 0 && get().transmitBlocked) {
@@ -77,8 +77,7 @@ export const useAudioStore = create<TalkState>((set, get) => ({
set({ micDeviceId, micVolume });
},
toggleTalking: () => {
const { room, isTalking, micDeviceId, micVolume, speakingParticipants, transmitBlocked } =
get();
const { room, isTalking, micDeviceId, speakingParticipants, transmitBlocked } = get();
if (!room) return;
if (speakingParticipants.length > 0 && !isTalking && !transmitBlocked) {
@@ -187,7 +186,7 @@ interface PTTData {
}
const handlePTT = (data: PTTData) => {
const { shouldTransmit, source } = data;
const { shouldTransmit } = data;
const { room, speakingParticipants } = useAudioStore.getState();
if (!room) return;