-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(user_account): added PR requirements
- Loading branch information
DimitrySakalouski
committed
Oct 25, 2023
1 parent
2896335
commit 6a30f56
Showing
2 changed files
with
23 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
}, | ||
], | ||
); | ||
} |