summaryrefslogtreecommitdiff
path: root/src/core/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/components')
-rw-r--r--src/core/components/layouts/BasicLayout.jsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/components/layouts/BasicLayout.jsx b/src/core/components/layouts/BasicLayout.jsx
index d6b96f36..1b62bf05 100644
--- a/src/core/components/layouts/BasicLayout.jsx
+++ b/src/core/components/layouts/BasicLayout.jsx
@@ -24,6 +24,7 @@ const BasicLayout = ({ children }) => {
const [highlight, setHighlight] = useState(false);
const [buttonPosition, setButtonPosition] = useState(null);
const [wobble, setWobble] = useState(false);
+ const [isProductPage, setIsProductPage] = useState(false);
const { isDesktop, isMobile } = useDevice();
@@ -46,6 +47,9 @@ const BasicLayout = ({ children }) => {
setUrlPath(router.asPath);
}
+ if (router.pathname.includes('/shop/product/')) {
+ setIsProductPage(true);
+ }
}, [product, router]);
useEffect(() => {
@@ -111,7 +115,11 @@ const BasicLayout = ({ children }) => {
<Navbar />
<AnimationLayout>
{children}
- <div className='fixed bottom-16 right-4 sm:bottom-14 sm:right-10 z-50'>
+ <div
+ className={`fixed ${
+ isMobile && isProductPage ? 'bottom-40' : 'bottom-16'
+ } right-4 sm:bottom-14 sm:right-10 z-50`}
+ >
<div className='flex flex-row items-center'>
<a
href={whatsappUrl(templateWA, payloadWA, urlPath)}