Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
PSS2134 committed Dec 28, 2023
1 parent 5debd4e commit 5db38fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/components/ShopCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const ShopCard = (props) => {
{
setdescr(desc);
}
setWish(true);
setTimeout(async()=>{
const res=await fetch(`http://localhost:4000/addWish?email=${user.email}`, {
method: "POST",
Expand All @@ -43,7 +44,7 @@ const ShopCard = (props) => {
const data=await res.json();

if(data.message=="New Wish created"|| data.message=="Wish Updated")
{ setWish(true);
{
toast.success('Added to Wishlist');
navigate('/wishlist')
}
Expand Down

0 comments on commit 5db38fe

Please sign in to comment.