summaryrefslogtreecommitdiff
path: root/src/core/components
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-07-29 14:15:41 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-07-29 14:15:41 +0700
commitaad3092b7c2b293333d894a192c8056f6502c9a0 (patch)
tree8afbbbfbd492b5d1a581dc9a8fd0de4242be4c76 /src/core/components
parent556e7e226a2043d43bc55bf0ff2118294bb9f330 (diff)
<iman> update top banner
Diffstat (limited to 'src/core/components')
-rw-r--r--src/core/components/elements/Navbar/TopBanner.jsx22
1 files changed, 12 insertions, 10 deletions
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>
);