From deaa4c5417bfb8b41d00b523e63e1b9b24a6ff76 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Wed, 12 Nov 2025 18:26:25 +0700 Subject: hide whatsapp --- src/core/components/layouts/BasicLayout.jsx | 101 +++++++++++++++------------- 1 file changed, 53 insertions(+), 48 deletions(-) (limited to 'src') diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx index 81f8b41f..b13e807d 100644 --- a/src/core/components/layouts/BasicLayout.jsx +++ b/src/core/components/layouts/BasicLayout.jsx @@ -33,6 +33,10 @@ const BasicLayout = ({ children }) => { const { product } = useProductContext(); + const hasPrice = + product && + Number(product?.lowest_price?.price || product?.price?.price) > 0; + useEffect(() => { if ( router.pathname === '/shop/product/[slug]' || @@ -54,8 +58,7 @@ const BasicLayout = ({ children }) => { useEffect(() => { const handleMouseOut = (event) => { - - if (!buttonRef.current) return; + if (!buttonRef.current) return; const rect = buttonRef.current.getBoundingClientRect(); if (event.clientY <= 0) { setButtonPosition(rect); @@ -114,56 +117,58 @@ const BasicLayout = ({ children }) => { onAnimationEnd={() => setHighlight(false)} /> )} - + {children} -