From 1d2b6e3243b4e40be548db30446fe539e3b627c5 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta Date: Sat, 28 Aug 2021 16:27:36 +0530 Subject: [PATCH] Add button for delete account --- src/components/Sidebar.tsx | 11 +++++++---- src/utils/strings/englishConstants.tsx | 12 ++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index ebbbe2710..3bde200be 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -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 }, diff --git a/src/utils/strings/englishConstants.tsx b/src/utils/strings/englishConstants.tsx index 8a9b7ff43..5ea1527e5 100644 --- a/src/utils/strings/englishConstants.tsx +++ b/src/utils/strings/englishConstants.tsx @@ -192,6 +192,18 @@ const englishConstants = { CANCEL: 'cancel', LOGOUT: 'logout', DELETE_ACCOUNT: 'delete account', + DELETE_MESSAGE: () => ( + <> +

+ please send an email to{' '} + + account-deletion@ente.io + {' '} + from your registered email address.{' '} +

+ your request will be processed within 72 hours. + + ), LOGOUT_MESSAGE: 'sure you want to logout?', CHANGE: 'change', CHANGE_EMAIL: 'change email?',