From 53d214ef3222bcc4169b188bff3dadf6c43f6b7e Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Tue, 30 Jul 2024 14:27:23 +0700
Subject: <iman> git aMerge branch 'Feature/category-management' into
 development

---
 src/core/components/elements/Navbar/TopBanner.jsx | 29 +++++++++++------------
 1 file changed, 14 insertions(+), 15 deletions(-)

(limited to 'src/core/components/elements/Navbar/TopBanner.jsx')

diff --git a/src/core/components/elements/Navbar/TopBanner.jsx b/src/core/components/elements/Navbar/TopBanner.jsx
index 83ef8c7a..df47e87d 100644
--- a/src/core/components/elements/Navbar/TopBanner.jsx
+++ b/src/core/components/elements/Navbar/TopBanner.jsx
@@ -1,12 +1,12 @@
 import Image from 'next/image';
-import { useQuery } from 'react-query';
-
+import { useQuery } from 'react-query';import useDevice from '@/core/hooks/useDevice'
 import odooApi from '@/core/api/odooApi';
 import SmoothRender from '~/components/ui/smooth-render';
 import Link from '../Link/Link';
 import { background } from '@chakra-ui/react';
 
 const TopBanner = () => {
+  const { isDesktop, isMobile } = useDevice()
   const topBanner = useQuery({
     queryKey: 'topBanner',
     queryFn: async () => await odooApi('GET', '/api/v1/banner?type=top-banner'),
@@ -20,22 +20,21 @@ const TopBanner = () => {
   return (
     <SmoothRender
       isLoaded={hasData}
-      height='36px'
+      // height='36px'
       duration='700ms'
       delay='300ms'
-    >
-     <Link
-        href={data?.url}
-        className="block"
-        style={{
-          backgroundImage: `url('${data?.image}')`,
-          backgroundPosition: 'center',
-          backgroundSize: 'cover',
-          height: '36px',
-        }}
+      className='h-auto'
       >
-      </Link>
-    </SmoothRender>
+      <Link
+          href={data?.url}
+          className="block bg-cover bg-center h-3 md:h-6 lg:h-[36px]"
+          style={{
+            backgroundImage: `url('${data?.image}')`,
+          }}
+        >
+        </Link>
+
+      </SmoothRender>
   );
 };
 
-- 
cgit v1.2.3

