Files
nguyencongpc_nextjs/src/app/pages/Home/Deal/index.tsx

49 lines
1.7 KiB
TypeScript
Raw Normal View History

2025-12-19 11:13:03 +07:00
'use client';
import React from 'react';
2025-12-27 10:03:53 +07:00
import Link from 'next/link';
2025-12-19 11:13:03 +07:00
import { Swiper, SwiperSlide } from 'swiper/react';
import { Autoplay, Navigation, Pagination } from 'swiper/modules';
import { FaCaretRight } from 'react-icons/fa';
2025-12-23 20:36:46 +07:00
2025-12-30 16:47:24 +07:00
import { ListDealData } from '@/data/deal';
2025-12-27 10:03:53 +07:00
2026-01-05 13:50:16 +07:00
import CounDown from '@components/Common/CounDown';
2025-12-27 10:03:53 +07:00
import ProductItem from './ProductItem';
2025-12-19 11:13:03 +07:00
const BoxProductDeal: React.FC = () => {
return (
<div className="box-product-deal boder-radius-10">
<div className="box-title-deal flex items-center justify-between">
<div className="title-deal flex items-center justify-center gap-10">
<i className="sprite sprite-icon-deal-home"></i>
<h2 className="title font-bold">Giá tốt mỗi ngày</h2>
<span className="text-time-deal-home color-white fz-16 font-bold">Kết thúc sau</span>
2025-12-19 13:42:52 +07:00
<div className="global-time-deal flex items-center gap-2">
2026-01-05 13:50:16 +07:00
<CounDown deadline={'31-01-2026, 9:30 am'} />
2025-12-19 13:42:52 +07:00
</div>
2025-12-19 11:13:03 +07:00
</div>
2025-12-27 10:03:53 +07:00
<Link href="/deal" className="button-deal color-white mb-10 flex items-center">
2025-12-19 11:13:03 +07:00
Xem thêm khuyến mãi <FaCaretRight size={16} />
2025-12-27 10:03:53 +07:00
</Link>
2025-12-19 11:13:03 +07:00
</div>
<div className="box-list-item-deal swiper-box-deal">
<Swiper
modules={[Autoplay, Navigation, Pagination]}
spaceBetween={12}
slidesPerView={6}
loop={true}
navigation={true}
2025-12-27 10:03:53 +07:00
>
2025-12-30 16:47:24 +07:00
{ListDealData.map((Item, index) => (
2025-12-27 10:03:53 +07:00
<SwiperSlide key={index}>
<ProductItem item={Item} />
</SwiperSlide>
))}
</Swiper>
2025-12-19 11:13:03 +07:00
</div>
</div>
);
};
export default BoxProductDeal;