summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-08-01 09:20:26 +0000
committerIT Fixcomart <it@fixcomart.co.id>2024-08-01 09:20:26 +0000
commit1289137544d0ab399de22fd9d9c6824ad4f55223 (patch)
treeb1245d9e353abe45d98b78970dc9f4726aea715f
parenta1906c7576455a1a44283fe60cd7e1a1b4c628d1 (diff)
parent93c68dbc6a873fa84b14eb3d102013f42e53af8a (diff)
Merged in Feature/all-promotion (pull request #197)
Feature/all promotion
-rw-r--r--src-migrate/modules/promo/components/Hero.tsx15
-rw-r--r--src/core/components/elements/Navbar/NavbarDesktop.jsx4
2 files changed, 10 insertions, 9 deletions
diff --git a/src-migrate/modules/promo/components/Hero.tsx b/src-migrate/modules/promo/components/Hero.tsx
index 801136e9..110052ba 100644
--- a/src-migrate/modules/promo/components/Hero.tsx
+++ b/src-migrate/modules/promo/components/Hero.tsx
@@ -13,8 +13,8 @@ import DesktopView from '@/core/components/views/DesktopView';
import {bannerApi} from '../../../../src/api/bannerApi'
interface IPromotionProgram {
- headline_banner: string;
- description_banner: string;
+ headlineBanner: string;
+ descriptionBanner: string;
image: string ;
name: string;
}
@@ -43,7 +43,7 @@ const swiperBannerMob = {
};
const Hero = () => {
- const heroBanner = useQuery('heroBannerSecondary', bannerApi({ type: 'banner-semua-promo' }))
+ const heroBanner = useQuery('allPromo', bannerApi({ type: 'banner-semua-promo' }));
const banners: IPromotionProgram[] = useMemo(
() => heroBanner?.data || [],
@@ -55,7 +55,8 @@ const Hero = () => {
pagination: { dynamicBullets: false, clickable: true },
};
-
+ console.log("banner",banners)
+ // console.log("headlineBanner",banners[0].headlineBanner)
return (
<>
<DesktopView>
@@ -64,9 +65,9 @@ const Hero = () => {
{banners.map((banner, index) => (
<SwiperSlide key={index} className='flex flex-row'>
<div className={style['desc-section']}>
- <div className={style['title']}>{banner.headline_banner? banner.headline_banner : "Pasti Hemat & Untung Selama Belanja di Indoteknik.com!"}</div>
+ <div className={style['title']}>{banner.headlineBanner? banner.headlineBanner : "Pasti Hemat & Untung Selama Belanja di Indoteknik.com!"}</div>
<div className='h-4' />
- <div className={style['subtitle']}>{banner.description_banner? banner.description_banner : "Cari paket yang kami sediakan dengan penawaran harga & Nikmati kemudahan dalam setiap transaksi dengan fitur lengkap Pembayaran hingga barang sampai!"}</div>
+ <div className={style['subtitle']}>{banner.descriptionBanner? banner.descriptionBanner : "Cari paket yang kami sediakan dengan penawaran harga & Nikmati kemudahan dalam setiap transaksi dengan fitur lengkap Pembayaran hingga barang sampai!"}</div>
</div>
<div className={style['banner-section']}>
<Image
@@ -74,7 +75,7 @@ const Hero = () => {
alt={banner.name}
width={666}
height={450}
- quality={100}
+ quality={90}
className='w-full h-full object-fit object-center rounded-2xl' />
</div>
</SwiperSlide>
diff --git a/src/core/components/elements/Navbar/NavbarDesktop.jsx b/src/core/components/elements/Navbar/NavbarDesktop.jsx
index f157297e..c6e80e87 100644
--- a/src/core/components/elements/Navbar/NavbarDesktop.jsx
+++ b/src/core/components/elements/Navbar/NavbarDesktop.jsx
@@ -213,7 +213,7 @@ const NavbarDesktop = () => {
rel="noreferrer"
>
<p className="absolute inset-0 flex justify-center items-center group-hover:scale-105 group-hover:text-red-500 transition-transform duration-200 z-10">Semua Promo</p>
- <div className='w-full h-full flex justify-end items-start'>
+ {/* <div className='w-full h-full flex justify-end items-start'>
<Image
src='/images/ICON PROMO DISKON.svg'
alt='promo'
@@ -222,7 +222,7 @@ const NavbarDesktop = () => {
quality={100}
className={`inline-block z-20`}
/>
- </div>
+ </div> */}
</Link>