Skip to content

Commit

Permalink
update and add toast messages on boookmark added & removed
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruv8433 committed Jun 1, 2024
1 parent 1427cff commit c36c89d
Show file tree
Hide file tree
Showing 2 changed files with 277 additions and 308 deletions.
2 changes: 2 additions & 0 deletions frontend/src/Component/BookMark.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { deleteSource } from "../Slice/DataSlice";
import bookmarkAnimation from "../lottie/bookmark.json";
import "../style/BookMark.css";
import Lottie from "lottie-react";
import toast from "react-hot-toast";

function BookMark() {
const sourceData = useSelector((state) => state.SourceReducer.sourceData);
Expand All @@ -21,6 +22,7 @@ function BookMark() {
(bookmark) => bookmark.name !== name
);
localStorage.setItem("bookmarks", JSON.stringify(updatedBookmarks));
toast.success("Bookmark removed successfully");
};

// Get current bookmarks
Expand Down
Loading

0 comments on commit c36c89d

Please sign in to comment.