Skip to content

Commit

Permalink
added product id in buy button
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishektiwari47 committed Dec 3, 2023
1 parent 89c518f commit 35b0c5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/client/src/components/visitor/ProductCard.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 35b0c5b

Please sign in to comment.