summaryrefslogtreecommitdiff
path: root/src/core/components
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-07-29 15:23:01 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-07-29 15:23:01 +0700
commita59ed6e73a599a82d6ef248c57ad29f2ab9cb15d (patch)
treed87d37a5dafda05e44123be8a0cf1791d086e3ae /src/core/components
parentb951ed0de4285076a71f57a0e440b5e68d4a44bd (diff)
<iman> Merge branch 'Feature/category-management' into development
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>
);