From f90a1e3549f39ef12e60cff452b2fbf6a16ece65 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 12 May 2025 15:56:16 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8(frontend)=20resolve=20TypeScript?= =?UTF-8?q?=20build=20errors=20after=20dependencies=20upgrade?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix type checking failures caused by recent dependency updates. --- .../livekit/hooks/usePersistentUserChoices.ts | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/features/rooms/livekit/hooks/usePersistentUserChoices.ts b/src/frontend/src/features/rooms/livekit/hooks/usePersistentUserChoices.ts index 7e3846fb..afe43715 100644 --- a/src/frontend/src/features/rooms/livekit/hooks/usePersistentUserChoices.ts +++ b/src/frontend/src/features/rooms/livekit/hooks/usePersistentUserChoices.ts @@ -19,23 +19,38 @@ export function usePersistentUserChoices( ) const saveAudioInputEnabled = React.useCallback((isEnabled: boolean) => { - setSettings((prev) => ({ ...prev, audioEnabled: isEnabled })) + setSettings((prev: LocalUserChoices) => ({ + ...prev, + audioEnabled: isEnabled, + })) }, []) const saveVideoInputEnabled = React.useCallback((isEnabled: boolean) => { - setSettings((prev) => ({ ...prev, videoEnabled: isEnabled })) + setSettings((prev: LocalUserChoices) => ({ + ...prev, + videoEnabled: isEnabled, + })) }, []) const saveAudioInputDeviceId = React.useCallback((deviceId: string) => { - setSettings((prev) => ({ ...prev, audioDeviceId: deviceId })) + setSettings((prev: LocalUserChoices) => ({ + ...prev, + audioDeviceId: deviceId, + })) }, []) const saveVideoInputDeviceId = React.useCallback((deviceId: string) => { - setSettings((prev) => ({ ...prev, videoDeviceId: deviceId })) + setSettings((prev: LocalUserChoices) => ({ + ...prev, + videoDeviceId: deviceId, + })) }, []) const saveUsername = React.useCallback((username: string) => { - setSettings((prev) => ({ ...prev, username: username })) + setSettings((prev: LocalUserChoices) => ({ ...prev, username: username })) }, []) const saveProcessorSerialized = React.useCallback( (processorSerialized?: ProcessorSerialized) => { - setSettings((prev) => ({ ...prev, processorSerialized })) + setSettings((prev: LocalUserChoices) => ({ + ...prev, + processorSerialized, + })) }, [] )