diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 0f846b53..fb64cb88 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -189,11 +189,13 @@ export const InCallView: FC = ({ const reactionsIcons = useMemo( () => - shouldShowReactions ? Object.entries(reactions).map(([sender, { emoji }]) => ({ - sender, - emoji, - startX: -Math.ceil(Math.random() * 50) - 25, - })) : [], + shouldShowReactions + ? Object.entries(reactions).map(([sender, { emoji }]) => ({ + sender, + emoji, + startX: -Math.ceil(Math.random() * 50) - 25, + })) + : [], [shouldShowReactions, reactions], ); diff --git a/src/room/ReactionAudioRenderer.tsx b/src/room/ReactionAudioRenderer.tsx index 104c6a1d..04f4bf8b 100644 --- a/src/room/ReactionAudioRenderer.tsx +++ b/src/room/ReactionAudioRenderer.tsx @@ -14,7 +14,9 @@ export function ReactionsAudioRenderer(): ReactNode { const { reactions } = useReactions(); const [shouldPlay] = useSetting(playReactionsSound); - const expectedReactions = shouldPlay ? [...new Set([...Object.values(reactions)])] : []; + const expectedReactions = shouldPlay + ? [...new Set([...Object.values(reactions)])] + : []; return ( <> {expectedReactions.map( diff --git a/src/settings/PreferencesSettingsTab.tsx b/src/settings/PreferencesSettingsTab.tsx index dd26ba47..c44ae85d 100644 --- a/src/settings/PreferencesSettingsTab.tsx +++ b/src/settings/PreferencesSettingsTab.tsx @@ -23,15 +23,12 @@ export const PreferencesSettingsTab: FC = () => { showHandRaisedTimerSetting, ); - const [showReactions, setShowReactions] = useSetting( - showReactionsSetting, - ); + const [showReactions, setShowReactions] = useSetting(showReactionsSetting); const [playReactionsSound, setPlayReactionSound] = useSetting( playReactionsSoundSetting, ); - const onChangeSetting = useCallback( (e: ChangeEvent, fn: (value: boolean) => void) => { fn(e.target.checked); @@ -60,9 +57,7 @@ export const PreferencesSettingsTab: FC = () => { onChangeSetting(e, setShowReactions)} diff --git a/src/settings/settings.ts b/src/settings/settings.ts index abae8ea0..3bc88ec4 100644 --- a/src/settings/settings.ts +++ b/src/settings/settings.ts @@ -90,10 +90,7 @@ export const showHandRaisedTimer = new Setting( false, ); -export const showReactions = new Setting( - "reactions-show", - true, -); +export const showReactions = new Setting("reactions-show", true); export const playReactionsSound = new Setting( "reactions-play-sound",