Skip to content

Commit

Permalink
Fixed "delete all content" modal not closing in AdminX (#18620)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
binary-koan authored Oct 13, 2023
1 parent 1a83fed commit 31b3905
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 31b3905

Please sign in to comment.