From bc8e76f00eaa74eb0cc51b79662a53ef34a3ed67 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Fri, 24 Mar 2023 17:05:47 +0700
Subject: -

---
 src/lib/product/components/ProductCard.jsx | 12 ++++++++++++
 1 file changed, 12 insertions(+)

(limited to 'src/lib/product/components/ProductCard.jsx')

diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index 3454d4fd..5710e9ea 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -2,8 +2,20 @@ import Image from '@/core/components/elements/Image/Image'
 import Link from '@/core/components/elements/Link/Link'
 import currencyFormat from '@/core/utils/currencyFormat'
 import { createSlug } from '@/core/utils/slug'
+import { useEffect, useState } from 'react'
+import productPriceApi from '../api/productPriceApi'
 
 const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
+  const [price, setPrice] = useState(null)
+
+  useEffect(() => {
+    const loadPrice = async () => {
+      const dataPrice = await productPriceApi({ id: product.id })
+      // console.log(dataPrice)
+    }
+    loadPrice()
+  })
+
   if (variant == 'vertical') {
     return (
       <div className='rounded shadow-sm border border-gray_r-4 h-full bg-white'>
-- 
cgit v1.2.3

