Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
thezeeshann committed Sep 19, 2024
1 parent c8a11b4 commit 706478d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/dashboard/_components/testimonial-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@ const TestimonialCard = ({
setIsLiked(storedLikes);
}, []);

// Function to handle like/unlike actions
const handleLikeClick = (id) => {
setIsLiked((prevLikes) => {
const updatedLikes = { ...prevLikes, [id]: !prevLikes[id] };
localStorage.setItem("likes", JSON.stringify(updatedLikes)); // Save to localStorage
localStorage.setItem("likes", JSON.stringify(updatedLikes));
return updatedLikes;
});
};
Expand Down

0 comments on commit 706478d

Please sign in to comment.