From 4d845ec392849abec9d9a89d4c315c8dcdfb207b Mon Sep 17 00:00:00 2001
From: sowgro <tpoke.ferrari@gmail.com>
Date: Sat, 18 Jan 2025 15:52:30 -0500
Subject: Add confirmation when deleting a folder

---
 extension/src/components/FolderButton.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'extension/src/components/FolderButton.tsx')

diff --git a/extension/src/components/FolderButton.tsx b/extension/src/components/FolderButton.tsx
index 03bcc76..30093fd 100644
--- a/extension/src/components/FolderButton.tsx
+++ b/extension/src/components/FolderButton.tsx
@@ -79,7 +79,10 @@ function FolderButton(props: {id: string}) {
 
     // actions
     const handleDelete = () => {
-        getBrowser().bookmarks.removeTree(bmData.id);
+        let r = window.confirm("Are you sure you want to delete this folder?\nDeleting a folder will delete all of the items inside of it.").valueOf()
+        if (r) {
+            getBrowser().bookmarks.removeTree(bmData.id);
+        }
         // location.reload();
     };
 
-- 
cgit v1.2.3

