From 1c88fa099d6bb3712d4228ad2d084ee2cfb08873 Mon Sep 17 00:00:00 2001
From: egdose <57728907+egdose@users.noreply.github.com>
Date: Sun, 11 Aug 2024 13:44:52 +0500
Subject: [PATCH] added bookmark deletion confirmation prompt, enhancement #274
Added a confirmation prompt when deleting bookmark using modal component. Modified modal component a bit and tested out its functionality in other test cases as well.
---
extension/src/components/Bookmarks/Bookmark/Bookmark.js | 5 +++--
extension/src/components/Modal/Modal.js | 9 ++++++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/extension/src/components/Bookmarks/Bookmark/Bookmark.js b/extension/src/components/Bookmarks/Bookmark/Bookmark.js
index fd65c6c4..c44b17a7 100644
--- a/extension/src/components/Bookmarks/Bookmark/Bookmark.js
+++ b/extension/src/components/Bookmarks/Bookmark/Bookmark.js
@@ -81,8 +81,9 @@ const Bookmark = ({
}
};
- const removeBookmarkFunction = () => {
+ const removeBookmarkFunction = (closeModal) => {
removeBookmark(itemInfo.appid, itemInfo.contextid, itemInfo.assetid, added);
+ closeModal();
};
const qualityClass = (itemInfo.quality !== undefined && itemInfo.quality !== null)
@@ -153,7 +154,7 @@ const Bookmark = ({