Skip to content

Commit

Permalink
fix(user_account): added PR requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitrySakalouski committed Oct 25, 2023
1 parent 2896335 commit 6a30f56
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 28 deletions.
1 change: 1 addition & 0 deletions src/screens/ui/SettingsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ const SettingsScreen: FC = () => {
title={t('settings:upload_logs')}
/>

<DeleteAccountRowButton />
<LogoutRowButton />
</YStack>
</Box>
Expand Down
50 changes: 22 additions & 28 deletions src/shared/lib/alerts/deleteAccountAlert.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
import { Alert } from 'react-native';

export function onDeleteAccount(onConfirm: () => void) {
return new Promise(resolve => {
Alert.alert(
'Account Deletion Request',
'Are you sure you want to delete your account? All data will be permanently deleted',
[
{
text: 'Cancel',
onPress: resolve,
},
{
text: 'Yes, delete',
onPress: onConfirm,
},
],
);
});
Alert.alert(
'Account Deletion Request',
'Are you sure you want to delete your account? All data will be permanently deleted',
[
{
text: 'Cancel',
},
{
text: 'Yes, delete',
onPress: onConfirm,
},
],
);
}

export function onDeleteAccountConfirmed() {
return new Promise(resolve => {
Alert.alert(
'Account Deletion Request Has Been Sent',
`Account Deletion takes up to 24 hours.\n\n
Alert.alert(
'Account Deletion Request Has Been Sent',
`Account Deletion takes up to 24 hours.\n\n
During this time, you will be logged out, and access to your account will be blocked.\n\n
If you change your mind please contact us
`,
[
{
text: 'Ok',
onPress: resolve,
},
],
);
});
[
{
text: 'Ok',
},
],
);
}

0 comments on commit 6a30f56

Please sign in to comment.