diff options
Diffstat (limited to 'src/view/screens/Settings.tsx')
-rw-r--r-- | src/view/screens/Settings.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/view/screens/Settings.tsx b/src/view/screens/Settings.tsx index e56a50d79..baad2227b 100644 --- a/src/view/screens/Settings.tsx +++ b/src/view/screens/Settings.tsx @@ -59,6 +59,7 @@ import { } from '#/state/preferences' import {useSession, useSessionApi, SessionAccount} from '#/state/session' import {useProfileQuery} from '#/state/queries/profile' +import {useClearPreferencesMutation} from '#/state/queries/preferences' // TEMPORARY (APP-700) // remove after backend testing finishes @@ -153,6 +154,7 @@ export const SettingsScreen = withAuthRequired( const {openModal} = useModalControls() const {isSwitchingAccounts, accounts, currentAccount} = useSession() const {clearCurrentAccount} = useSessionApi() + const {mutate: clearPreferences} = useClearPreferencesMutation() const primaryBg = useCustomPalette<ViewStyle>({ light: {backgroundColor: colors.blue0}, @@ -219,9 +221,8 @@ export const SettingsScreen = withAuthRequired( }, [openModal]) const onPressResetPreferences = React.useCallback(async () => { - await store.preferences.reset() - Toast.show('Preferences reset') - }, [store]) + clearPreferences() + }, [clearPreferences]) const onPressResetOnboarding = React.useCallback(async () => { onboardingDispatch({type: 'start'}) @@ -300,7 +301,7 @@ export const SettingsScreen = withAuthRequired( </View> <View style={[styles.infoLine]}> <Text type="lg-medium" style={pal.text}> - <Trans>Birthday: </Trans> + <Trans>Birthday:</Trans>{' '} </Text> <Link onPress={() => openModal({name: 'birth-date-settings'})}> <Text type="lg" style={pal.link}> |