From ec1daf8936a1290100f13ddb762287e85a6f0bb6 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Fri, 4 Aug 2023 10:08:17 +0700
Subject: feedback testing

---
 src/lib/product/components/ProductCard.jsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 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 b38bb43c..491ecaae 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -6,9 +6,11 @@ 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'
 
 const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
-  console.log('ini prodyct ', product)
+  const router = useRouter()
+  console.log('ini route', router)
   const callForPriceWhatsapp = whatsappUrl('product', {
     name: product.name,
     url: createSlug('/shop/product/', product.name, product.id, true)
@@ -16,7 +18,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-[350px] w-[165px]'>
         <Link
           href={createSlug('/shop/product/', product?.name, product?.id)}
           className='border-b border-gray_r-4 relative'
@@ -26,7 +28,7 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
             alt={product?.name}
             className='w-full object-contain object-center h-36 sm:h-48'
           />
-          {product?.flashSale?.id > 0 && (
+          {router.pathname != '/' && product?.flashSale?.id > 0 && (
             <div className='absolute bottom-0 bg-red-600 w-full h-10 grid'>
               <div className='flex gap-x-1 items-center p-2 justify-center'>
                 <div className='bg-yellow-400 rounded-full p-1 h-6 w-19 flex items-center justify-center '>
-- 
cgit v1.2.3

