From 5db38fe8130b5aa1de44705a37f910b6bd3e46a1 Mon Sep 17 00:00:00 2001 From: Priyansh S Shrivastav Date: Thu, 28 Dec 2023 21:09:03 +0530 Subject: [PATCH] Update --- client/src/components/ShopCard.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/ShopCard.js b/client/src/components/ShopCard.js index d9129bd9..29e42c96 100644 --- a/client/src/components/ShopCard.js +++ b/client/src/components/ShopCard.js @@ -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", @@ -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') }