+7
-5
@@ -27,12 +27,13 @@ type SettingsAccountsRowDropdownMenuProps = {
|
||||
account: ConnectedAccount;
|
||||
};
|
||||
|
||||
const DELETE_ACCOUNT_MODAL_ID = 'delete-account-modal';
|
||||
|
||||
export const SettingsAccountsRowDropdownMenu = ({
|
||||
account,
|
||||
}: SettingsAccountsRowDropdownMenuProps) => {
|
||||
const dropdownId = `settings-account-row-${account.id}`;
|
||||
const deleteAccountModalId = `delete-account-modal-${account.id}`;
|
||||
const accountHandle = account.handle;
|
||||
|
||||
const { t } = useLingui();
|
||||
const { openModal } = useModal();
|
||||
|
||||
@@ -104,7 +105,7 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
text={t`Remove account`}
|
||||
onClick={() => {
|
||||
closeDropdown(dropdownId);
|
||||
openModal(DELETE_ACCOUNT_MODAL_ID);
|
||||
openModal(deleteAccountModalId);
|
||||
}}
|
||||
/>
|
||||
</DropdownMenuItemsContainer>
|
||||
@@ -112,11 +113,12 @@ export const SettingsAccountsRowDropdownMenu = ({
|
||||
}
|
||||
/>
|
||||
<ConfirmationModal
|
||||
modalId={DELETE_ACCOUNT_MODAL_ID}
|
||||
modalId={deleteAccountModalId}
|
||||
title={t`Data deletion`}
|
||||
subtitle={
|
||||
<Trans>
|
||||
All emails and events linked to this account will be deleted
|
||||
All emails and events linked to this account ({accountHandle}) will
|
||||
be deleted
|
||||
</Trans>
|
||||
}
|
||||
onConfirmClick={deleteAccount}
|
||||
|
||||
Reference in New Issue
Block a user