mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 13:22:39 +03:00
Fixed "delete all content" modal not closing in AdminX (#18620)
refs https://github.com/TryGhost/Product/issues/3831 --- <!-- Leave the line below if you'd like GitHub Copilot to generate a summary from your commit --> copilot:summary
This commit is contained in:
parent
1a83fedfa4
commit
31b3905f8d
@ -64,13 +64,14 @@ const MigrationOptions: React.FC = () => {
|
||||
prompt: 'This is permanent! No backups, no restores, no magic undo button. We warned you, k?',
|
||||
okColor: 'red',
|
||||
okLabel: 'Delete',
|
||||
onOk: async () => {
|
||||
onOk: async (modal) => {
|
||||
try {
|
||||
await deleteAllContent(null);
|
||||
showToast({
|
||||
type: 'success',
|
||||
message: 'All content deleted from database.'
|
||||
});
|
||||
modal?.remove();
|
||||
await client.refetchQueries();
|
||||
} catch (e) {
|
||||
handleError(e);
|
||||
|
Loading…
Reference in New Issue
Block a user