From ffe99e68efc3447e9e9f1eec7207870b0bb2d9cb Mon Sep 17 00:00:00 2001 From: Monalika Patnaik Date: Thu, 28 Dec 2023 22:02:07 +0530 Subject: [PATCH] backend-url-change --- client/src/components/ShopCard.js | 2 +- client/src/components/Wishcard.js | 2 +- client/src/pages/Wishlist.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/ShopCard.js b/client/src/components/ShopCard.js index 29e42c96..a2a9794c 100644 --- a/client/src/components/ShopCard.js +++ b/client/src/components/ShopCard.js @@ -36,7 +36,7 @@ const ShopCard = (props) => { } setWish(true); setTimeout(async()=>{ - const res=await fetch(`http://localhost:4000/addWish?email=${user.email}`, { + const res=await fetch(`https://sheearns.onrender.com/addWish?email=${user.email}`, { method: "POST", headers: { "Content-Type": "application/json" }, body:JSON.stringify({shops:[{name:title,shopid:id,category:category,image:imgurl,description:descr}]}) diff --git a/client/src/components/Wishcard.js b/client/src/components/Wishcard.js index e7358bfb..5b682f7e 100644 --- a/client/src/components/Wishcard.js +++ b/client/src/components/Wishcard.js @@ -9,7 +9,7 @@ const Wishcard = ({img,name,description,id}) => { const navigate=useNavigate(); const {user}=useAuth0(); const remove=async()=>{ - const res = await fetch(`http://localhost:4000/deleteWish?email=${user.email}&shopid=${id}`, { + const res = await fetch(`https://sheearns.onrender.com/deleteWish?email=${user.email}&shopid=${id}`, { method: "PUT", headers: { "Content-Type": "application/json" }, diff --git a/client/src/pages/Wishlist.js b/client/src/pages/Wishlist.js index 912db206..eb6eac5b 100644 --- a/client/src/pages/Wishlist.js +++ b/client/src/pages/Wishlist.js @@ -11,7 +11,7 @@ const Wishlist = () => { const [show,setShow]=useState(true); useEffect(() => { - fetch(`http://localhost:4000/getWishAll?email=${user.email}`) + fetch(`https://sheearns.onrender.com/getWishAll?email=${user.email}`) .then((res) => res.json()) .then((data) => { console.log(data);