Skip to content

Commit

Permalink
warning via !confirm
Browse files Browse the repository at this point in the history
  • Loading branch information
aurorabor committed May 26, 2023
1 parent 2324b62 commit 4d160ec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stores/mints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "";
Expand Down

0 comments on commit 4d160ec

Please sign in to comment.