fix: delete account (#13543)

/closes #13540
This commit is contained in:
neo773
2025-08-01 11:15:48 +05:30
committed by GitHub
parent b41502a4b8
commit 9c972ece1b
@@ -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}