From 261b60eff4b11ded253501dddb73b1810625a9f5 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 30 May 2024 16:09:39 -0500 Subject: [PATCH] Deactivate dialog (cherry picked from commit 33940e2dfe0d710c0665a7f68b198b46f54db4a2) --- src/view/screens/Settings/index.tsx | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/view/screens/Settings/index.tsx b/src/view/screens/Settings/index.tsx index 078ebedabb..f5ecc86c50 100644 --- a/src/view/screens/Settings/index.tsx +++ b/src/view/screens/Settings/index.tsx @@ -63,6 +63,7 @@ import {ScrollView} from 'view/com/util/Views' import {useTheme} from '#/alf' import {useDialogControl} from '#/components/Dialog' import {BirthDateSettingsDialog} from '#/components/dialogs/BirthDateSettings' +import * as Prompt from '#/components/Prompt' import {navigate, resetToTab} from '#/Navigation' import {Email2FAToggle} from './Email2FAToggle' import {ExportCarDialog} from './ExportCarDialog' @@ -306,6 +307,11 @@ export function SettingsScreen({}: Props) { Toast.show(_(msg`Legacy storage cleared, you need to restart the app now.`)) }, [_]) + const deactivateAccountControl = Prompt.usePromptControl() + const onPressDeactivateAccount = React.useCallback(() => { + deactivateAccountControl.open() + }, [deactivateAccountControl]) + const {mutate: onPressDeleteChatDeclaration} = useDeleteActorDeclaration() return ( @@ -790,6 +796,38 @@ export function SettingsScreen({}: Props) { Export My Data + + + + + + + Deactivate my account + + + {}} + /> +