summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-06-26 15:30:48 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-06-26 15:30:48 +0700
commiteec3440fe52db85b325c600fdd393590dee906fe (patch)
tree480b6426d2a715a3c4220aeb94c7e06f4b268ae9
parent7c61c990c7987f7c3991e74ce53eb3204e268c75 (diff)
<iman> update all promotion
-rw-r--r--src-migrate/modules/promo/components/Hero.tsx4
-rw-r--r--src-migrate/modules/promo/components/PromoList.jsx37
-rw-r--r--src-migrate/modules/promo/styles/hero.module.css2
-rw-r--r--src/core/components/elements/Footer/BasicFooter.jsx3
-rw-r--r--src/pages/shop/promo/index.jsx2
5 files changed, 15 insertions, 33 deletions
diff --git a/src-migrate/modules/promo/components/Hero.tsx b/src-migrate/modules/promo/components/Hero.tsx
index d8bb0be4..ad1d0046 100644
--- a/src-migrate/modules/promo/components/Hero.tsx
+++ b/src-migrate/modules/promo/components/Hero.tsx
@@ -8,10 +8,10 @@ import { Swiper, SwiperProps, SwiperSlide } from 'swiper/react';
import { getBanner } from '~/services/banner';
import style from '../styles/hero.module.css';
import 'swiper/css/navigation';
-import { Navigation, Pagination } from 'swiper';
+import { Navigation, Pagination, Autoplay } from 'swiper';
const swiperBanner: SwiperProps = {
- modules:[Navigation, Pagination],
+ modules:[Navigation, Pagination, Autoplay],
autoplay: {
delay: 6000,
disableOnInteraction: false
diff --git a/src-migrate/modules/promo/components/PromoList.jsx b/src-migrate/modules/promo/components/PromoList.jsx
index 7187e9d7..529d54a1 100644
--- a/src-migrate/modules/promo/components/PromoList.jsx
+++ b/src-migrate/modules/promo/components/PromoList.jsx
@@ -4,8 +4,9 @@ import { fetchPromoItemsSolr } from '../../../../src/api/promoApi';
import { Swiper, SwiperSlide } from 'swiper/react';
import useDevice from '@/core/hooks/useDevice';
import LogoSpinner from '../../../../src/core/components/elements/Spinner/LogoSpinner';
-import usePromoStore from './promoStore'; // Sesuaikan dengan path yang sesuai
+import usePromoStore from './promoStore';
import { ChevronRightIcon } from '@heroicons/react/24/outline';
+import Link from '@/core/components/elements/Link/Link'
const PromoList = ({ selectedPromo }) => {
const {
@@ -71,16 +72,16 @@ const PromoList = ({ selectedPromo }) => {
}
}, [slug, setPromoItems, setPromoData, setIsLoading]);
-
-
- const navigateToPromoPage = () => {
- // Fungsi untuk menavigasikan pengguna ke halaman promo yang sesuai dengan slug
- window.location.href = '/shop/promo/' + slug;
- };
-
return (
<div className='h-[420px]'>
- <h1 className='text-h-sm md:text-h-lg font-semibold py-4'>{title}</h1>
+ <div className='flex justify-between items-center'>
+ <h1 className='text-h-sm md:text-h-lg font-semibold py-4'>{title}</h1>
+ <div>
+ <Link href={`/shop/promo/${slug}`} className='!text-red-500 font-semibold'>
+ Lihat Semua
+ </Link>
+ </div>
+ </div>
{isLoading ? (
<div className="loading-spinner flex justify-center">
<LogoSpinner width={48} height={48} />
@@ -94,26 +95,10 @@ const PromoList = ({ selectedPromo }) => {
</div>
</SwiperSlide>
))}
- <SwiperSlide>
- <div className='rounded-lg flex items-center justify-center flex-col cursor-pointer h-96 text-red-500 font-bold border-2 min-w-[380px] max-w-[380px] mb-[20px] sm:min-w-[330px] md:min-w-[360px] lg:min-w-[380px] xl:min-w-[380px]' onClick={navigateToPromoPage}>
- <ChevronRightIcon className="w-48 h-48 ml-2 font-normal text-red-500 hover:text-red-400 transition duration-300 transform hover:scale-125" />
- <span className=''>
- Lihat lebih banyak
- </span>
-
- {/* <button className="mt-4 text-black font-bold py-2 px-4 rounded min-w-[380px] max-w-[380px] mb-[20px] sm:min-w-[330px] md:min-w-[360px] lg:min-w-[380px] xl:min-w-[380px]" onClick={navigateToPromoPage}>
- </button> */}
- </div>
- </SwiperSlide>
-
</Swiper>
)}
</div>
);
};
-export default PromoList;
-// border-radius: 0.5rem;
-// border-width: 1px;
-// --tw-border-opacity: 1;
-// border-color: rgb(219 219 219 / var(--tw-border-opacity)); \ No newline at end of file
+export default PromoList; \ No newline at end of file
diff --git a/src-migrate/modules/promo/styles/hero.module.css b/src-migrate/modules/promo/styles/hero.module.css
index 70d725be..a5ba6ecc 100644
--- a/src-migrate/modules/promo/styles/hero.module.css
+++ b/src-migrate/modules/promo/styles/hero.module.css
@@ -1,5 +1,5 @@
.wrapper {
- @apply bg-warning-100/50 rounded-xl w-full h-[460px] flex;
+ @apply rounded-xl w-full h-[460px] flex;
}
.desc-section {
diff --git a/src/core/components/elements/Footer/BasicFooter.jsx b/src/core/components/elements/Footer/BasicFooter.jsx
index e1f95d6b..6129143d 100644
--- a/src/core/components/elements/Footer/BasicFooter.jsx
+++ b/src/core/components/elements/Footer/BasicFooter.jsx
@@ -9,14 +9,12 @@ import Link from '../Link/Link';
import MobileView from '../../views/MobileView';
import DesktopView from '../../views/DesktopView';
import whatsappUrl from '@/core/utils/whatsappUrl';
-import PromoOffer from '../Footer/PromoOffer'
const BasicFooter = () => {
return (
<>
<MobileView>
<footer className='flex flex-wrap p-4 bg-gray_r-3 text-caption-1'>
- <PromoOffer/>
<div className='w-1/2 flex flex-col gap-y-8 pr-2'>
<div>
<NextImage
@@ -56,7 +54,6 @@ const BasicFooter = () => {
<DesktopView>
<footer className='bg-gray_r-3 py-6'>
- <PromoOffer/>
<div className='container mx-auto flex flex-wrap justify-between'>
<div className='w-4/12'>
<NextImage
diff --git a/src/pages/shop/promo/index.jsx b/src/pages/shop/promo/index.jsx
index 442da742..01a11aad 100644
--- a/src/pages/shop/promo/index.jsx
+++ b/src/pages/shop/promo/index.jsx
@@ -24,7 +24,7 @@ const PromoPage = () => {
<BreadcrumbItem isCurrentPage>
<BreadcrumbLink className='whitespace-nowrap'>
- Semua Promo
+ Promo
</BreadcrumbLink>
</BreadcrumbItem>
</Breadcrumb>