From 16fed2e7d00252f5df3f9b5bdf0a5a2b2a094f76 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 8 Aug 2023 10:39:34 +0700
Subject: Improve home page performance

---
 src/lib/product/components/ProductCard.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(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 a8964310..51a369c4 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -12,7 +12,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
 
   if (variant == 'vertical') {
     return (
-      <div className='rounded shadow-sm border border-gray_r-4 bg-white h-[350px]'>
+      <div className='rounded shadow-sm border border-gray_r-4 bg-white h-[280px] md:h-[320px]'>
         <Link
           href={createSlug('/shop/product/', product?.name, product?.id)}
           className='border-b border-gray_r-4 relative'
-- 
cgit v1.2.3


From eadb2ba5872fc2e9a756948d9bbfa17f0958690a Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 8 Aug 2023 10:44:25 +0700
Subject: Update product card height

---
 src/lib/product/components/ProductCard.jsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(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 51a369c4..13fe07fd 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -12,7 +12,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
 
   if (variant == 'vertical') {
     return (
-      <div className='rounded shadow-sm border border-gray_r-4 bg-white h-[280px] md:h-[320px]'>
+      <div className='rounded shadow-sm border border-gray_r-4 bg-white h-[300px] md:h-[350px]'>
         <Link
           href={createSlug('/shop/product/', product?.name, product?.id)}
           className='border-b border-gray_r-4 relative'
-- 
cgit v1.2.3


From 28a598a7b0367aa3db14acf5dd700d6264a9f5cc Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 16 Aug 2023 16:26:07 +0700
Subject: Remove get flash sale background on product card

---
 src/lib/product/components/ProductCard.jsx | 13 -------------
 1 file changed, 13 deletions(-)

(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 5b859905..36cd8d18 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -1,31 +1,18 @@
-import CountDown2 from '@/core/components/elements/CountDown/CountDown2'
 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 whatsappUrl from '@/core/utils/whatsappUrl'
 import ImageNext from 'next/image'
-import Product from './Product/Product'
 import { useRouter } from 'next/router'
-import { useEffect, useState } from 'react'
-import odooApi from '@/core/api/odooApi'
 
 const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
   const router = useRouter()
   
-  const [backgorundFlashSale, setBackgorundFlashSale] = useState(null)
-  
   const callForPriceWhatsapp = whatsappUrl('product', {
     name: product.name,
     url: createSlug('/shop/product/', product.name, product.id, true)
   })
-  useEffect(() => {
-    const getBackgound = async () => {
-      const get = await odooApi('GET', '/api/v1/banner?type=flash-sale-background-banner')
-      setBackgorundFlashSale(get[0].image)
-    }
-    getBackgound()
-  }, [])
 
   if (variant == 'vertical') {
     return (
-- 
cgit v1.2.3

