diff --git a/packages/desktop-client/src/components/Titlebar.tsx b/packages/desktop-client/src/components/Titlebar.tsx index f7eba43e8e7..8179cb88542 100644 --- a/packages/desktop-client/src/components/Titlebar.tsx +++ b/packages/desktop-client/src/components/Titlebar.tsx @@ -60,15 +60,16 @@ type PrivacyButtonProps = { }; function PrivacyButton({ style }: PrivacyButtonProps) { - const [isPrivacyEnabled, setPrivacyEnabledPref] = + const [isPrivacyEnabledPref, setPrivacyEnabledPref] = useSyncedPref('isPrivacyEnabled'); + const isPrivacyEnabled = String(isPrivacyEnabledPref) === 'true'; const privacyIconStyle = { width: 15, height: 15 }; useHotkeys( 'shift+ctrl+p, shift+cmd+p, shift+meta+p', () => { - setPrivacyEnabledPref(!isPrivacyEnabled); + setPrivacyEnabledPref(String(!isPrivacyEnabled)); }, { preventDefault: true, @@ -81,7 +82,7 @@ function PrivacyButton({ style }: PrivacyButtonProps) {