From 35b0c5bc9ab3b82b80b1a2b6092ce3be704c5bea Mon Sep 17 00:00:00 2001 From: Abhishek Date: Mon, 4 Dec 2023 01:40:40 +0530 Subject: [PATCH] added product id in buy button --- apps/client/src/components/visitor/ProductCard.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/client/src/components/visitor/ProductCard.tsx b/apps/client/src/components/visitor/ProductCard.tsx index a1d9ddd..69bf515 100644 --- a/apps/client/src/components/visitor/ProductCard.tsx +++ b/apps/client/src/components/visitor/ProductCard.tsx @@ -1,6 +1,6 @@ import mongoose from "mongoose"; import { useRecoilState } from "recoil"; -import { buyState } from "../../data/RelatedStates"; +import { buyProductState, buyState } from "../../data/RelatedStates"; import { singleProductDataState } from "../../data/ComponentData"; import { useNavigate } from "react-router-dom"; @@ -33,7 +33,7 @@ function ProductCard(allProducts:{data:Product,userId:string}){ const [isBuyPressed, setBuyPressed] = useRecoilState(buyState); console.log(isBuyPressed); - // const [productId,setProductId] = useRecoilState(buyProductState); + const [productId,setProductId] = useRecoilState(buyProductState); const {data,userId} = allProducts const [productData,setProductData] = useRecoilState(singleProductDataState); console.log(productData);