diff --git a/src/components/pages/Category/Components/procard.jsx b/src/components/pages/Category/Components/procard.jsx
index 0344878..13e3316 100644
--- a/src/components/pages/Category/Components/procard.jsx
+++ b/src/components/pages/Category/Components/procard.jsx
@@ -1,6 +1,8 @@
-import React, { useState } from "react";
+import React,{ useState,useEffect,forwardRef,useImperativeHandle } from "react";
import { FiHeart } from "react-icons/fi";
+import { FaHeart } from "react-icons/fa";
import product_card from "../../../../api/Products.json";
+import { fetchResult } from "../../../../services/api/loaded-services";
import {
Badge,
Card,
@@ -21,106 +23,86 @@ import {
Productpage
} from "../../../../styles/pages/category-styles";
-const Card1 = () => {
+const Card1 = forwardRef((props,ref)=> {
+ const [productData, setproductData] = useState(Array())
+ const [wishlist, setwishlist] = useState(true)
const [radioPrice, SetRadioPrice] = useState("100to200");
const [radioSize, SetRadioSize] = useState("XXL");
const [toggleHeart, setToggleHeart] = useState(false);
- console.log(radioPrice);
+
+ useImperativeHandle(ref, () => ({
+ async fetchCategory(cat){
+ let pro=[];
+ pro = await fetchResult("product",cat)
+ setproductData(pro)
+ console.log("product",productData)
+ console.log("casga",cat)
+ }
+ }));
+
function HeartToggle(id) {
setToggleHeart(!toggleHeart);
console.log(id);
console.log(toggleHeart);
}
- const listItems1 = product_card.slice(0, 10).map((item, id) => (
-