Fix indexedDB deletion modal

This commit is contained in:
trevor-signal 2024-02-13 16:48:09 -05:00 committed by GitHub
parent 9ad6d5b66b
commit 5ba3ed1241
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 9 deletions

View file

@ -13,6 +13,7 @@ type ConfirmationDialogViewProps = {
title: string;
description?: string;
okText: string;
noMouseClose?: boolean;
reject?: (error: Error) => void;
resolve: () => void;
};
@ -25,7 +26,7 @@ function removeConfirmationDialog() {
return;
}
window.reduxActions.globalModals.toggleConfirmationModal(false);
window.reduxActions?.globalModals.toggleConfirmationModal(false);
unmountComponentAtNode(confirmationDialogViewNode);
document.body.removeChild(confirmationDialogViewNode);
@ -46,7 +47,7 @@ export function showConfirmationDialog(
removeConfirmationDialog();
}
window.reduxActions.globalModals.toggleConfirmationModal(true);
window.reduxActions?.globalModals.toggleConfirmationModal(true);
confirmationDialogViewNode = document.createElement('div');
document.body.appendChild(confirmationDialogViewNode);
@ -77,6 +78,7 @@ export function showConfirmationDialog(
removeConfirmationDialog();
}}
title={options.title}
noMouseClose={options.noMouseClose}
>
{options.description}
</ConfirmationDialog>,