Add button for delete account

This commit is contained in:
Neeraj Gupta 2021-08-28 16:27:36 +05:30
parent 8d4455b7ac
commit 1d2b6e3243
2 changed files with 19 additions and 4 deletions

View file

@ -314,12 +314,15 @@ export default function Sidebar(props: Props) {
style={{ marginTop: '30px' }}
onClick={() =>
props.setDialogMessage({
title: `${constants.CONFIRM} ${constants.LOGOUT}`,
content: constants.LOGOUT_MESSAGE,
title: `${constants.DELETE_ACCOUNT}`,
content: constants.DELETE_MESSAGE(),
staticBackdrop: true,
proceed: {
text: constants.LOGOUT,
action: logoutUser,
text: constants.DELETE_ACCOUNT,
action: () => {
window.location.href =
'mailto:account-deletion@ente.io';
},
variant: 'danger',
},
close: { text: constants.CANCEL },

View file

@ -192,6 +192,18 @@ const englishConstants = {
CANCEL: 'cancel',
LOGOUT: 'logout',
DELETE_ACCOUNT: 'delete account',
DELETE_MESSAGE: () => (
<>
<p>
please send an email to{' '}
<a href="mailto:account-deletion@ente.io">
account-deletion@ente.io
</a>{' '}
from your registered email address.{' '}
</p>
your request will be processed within 72 hours.
</>
),
LOGOUT_MESSAGE: 'sure you want to logout?',
CHANGE: 'change',
CHANGE_EMAIL: 'change email?',