From 98993e0555e59f4b896db1a5b31fe1ca66e0a5db Mon Sep 17 00:00:00 2001 From: Grace Kind Date: Fri, 31 Jul 2026 19:14:58 -0500 Subject: [PATCH] Add confirmation for unfollowing --- package.json | 2 +- src/js/profileInteractionHandler.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 4f51c9b5..e99aa9de 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "impro", - "version": "0.18.133", + "version": "0.18.134", "type": "module", "scripts": { "start": "rm -rf \"${BUILD_DIR:-build}\" && NODE_ENV=development eleventy --serve", diff --git a/src/js/profileInteractionHandler.js b/src/js/profileInteractionHandler.js index 90a2ac32..8280d4cb 100644 --- a/src/js/profileInteractionHandler.js +++ b/src/js/profileInteractionHandler.js @@ -22,6 +22,14 @@ export class ProfileInteractionHandler { showToast("Failed to follow account", { style: "error" }); } } else { + const confirmed = await confirmModal( + `Are you sure you want to unfollow ${getDisplayName(profile)}?`, + { + title: "Unfollow?", + confirmButtonText: "Unfollow", + }, + ); + if (!confirmed) return; try { await this.dataLayer.mutations.unfollowProfile(profile); showToast(`No longer following ${getDisplayName(profile)}`); -- 2.51.2