From aad3092b7c2b293333d894a192c8056f6502c9a0 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Mon, 29 Jul 2024 14:15:41 +0700
Subject: <iman> update top banner

---
 src/core/components/elements/Navbar/TopBanner.jsx | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 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 722a7501..83ef8c7a 100644
--- a/src/core/components/elements/Navbar/TopBanner.jsx
+++ b/src/core/components/elements/Navbar/TopBanner.jsx
@@ -4,6 +4,7 @@ import { useQuery } from 'react-query';
 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 topBanner = useQuery({
@@ -12,7 +13,7 @@ const TopBanner = () => {
     refetchOnWindowFocus: false,
   });
 
-  const backgroundColor = topBanner.data?.[0]?.backgroundColor || 'transparent';
+  // const backgroundColor = topBanner.data?.[0]?.backgroundColor || 'transparent';
   const hasData = topBanner.data?.length > 0;
   const data = topBanner.data?.[0] || null;
 
@@ -22,16 +23,17 @@ const TopBanner = () => {
       height='36px'
       duration='700ms'
       delay='300ms'
-      style={{ backgroundColor }}
     >
-      <Link href={data?.url}>
-        <Image
-          src={data?.image}
-          alt={data?.name}
-          width={1440}
-          height={40}
-          className='object-cover object-center h-full mx-auto'
-        />
+     <Link
+        href={data?.url}
+        className="block"
+        style={{
+          backgroundImage: `url('${data?.image}')`,
+          backgroundPosition: 'center',
+          backgroundSize: 'cover',
+          height: '36px',
+        }}
+      >
       </Link>
     </SmoothRender>
   );
-- 
cgit v1.2.3

