From eec3440fe52db85b325c600fdd393590dee906fe Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 26 Jun 2024 15:30:48 +0700 Subject: update all promotion --- src-migrate/modules/promo/components/Hero.tsx | 4 +-- src-migrate/modules/promo/components/PromoList.jsx | 37 +++++++--------------- src-migrate/modules/promo/styles/hero.module.css | 2 +- 3 files changed, 14 insertions(+), 29 deletions(-) (limited to 'src-migrate') 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 (
-

{title}

+
+

{title}

+
+ + Lihat Semua + +
+
{isLoading ? (
@@ -94,26 +95,10 @@ const PromoList = ({ selectedPromo }) => {
))} - -
- - - Lihat lebih banyak - - - {/* */} -
-
- )}
); }; -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 { -- cgit v1.2.3