From 4d160eccba6f13181da19495b7120e9700cc05d5 Mon Sep 17 00:00:00 2001 From: aurorabor Date: Thu, 25 May 2023 18:20:27 -0700 Subject: [PATCH] warning via !confirm --- src/stores/mints.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/stores/mints.ts b/src/stores/mints.ts index 4aa3a34b..4d350a20 100644 --- a/src/stores/mints.ts +++ b/src/stores/mints.ts @@ -163,6 +163,10 @@ export const useMintsStore = defineStore("mints", { } }, removeMint: async function (url: string) { + // Ask for confirmation before removing the mint + if (!confirm("Are you sure you want to remove this mint?")) { + return; // Abort the removal if the user cancels + } this.mints = this.mints.filter((m) => m.url !== url); if (url === this.activeMintUrl) { this.activeMintUrl = "";