diff --git a/features/home/sections/Hero/components/Swiper.tsx b/features/home/sections/Hero/components/Swiper.tsx index 82239d8..60f11c2 100644 --- a/features/home/sections/Hero/components/Swiper.tsx +++ b/features/home/sections/Hero/components/Swiper.tsx @@ -5,19 +5,19 @@ import { Button } from "@/shared/libs/shadcn/ui/button"; import { useRouter } from "next/navigation"; import { Autoplay, Navigation, Pagination } from "swiper/modules"; import { Swiper, SwiperSlide } from "swiper/react"; +import { Icon } from "@iconify/react"; export interface HeroSwiperProps { data: { id: string; - isClickable: boolean; title: string; - tags: string[]; - description: string; - buttonContent: string; - buttonLink: string; + slug: string; imageUrl: string; - startDate: string; - endDate: string; + synopsis: string; + genres: { + slug: string; + name: string; + }[]; }[]; } @@ -34,82 +34,54 @@ const HeroSwiper = (props: HeroSwiperProps) => { autoplay={{ delay: 5000, disableOnInteraction: false }} modules={[Autoplay, Pagination, Navigation]} > - {props.data.map((slide) => - slide.imageUrl ? ( - // Slide with image background - - - {slide.title && slide.description && ( - - - {slide.title} - - - {slide.tags.map((tag) => ( - - {tag} - - ))} - - - {slide.description} - - {slide.isClickable && ( - router.push(slide.buttonLink)} - className="mt-6" - > - {slide.buttonContent} - - )} - - )} - - ) : ( - // Fallback for slides without image - ( + + + {slide.title} - - {slide.tags.map((tag) => ( - - {tag} + + {slide.genres.map((genre) => ( + + {genre.name} ))} - - {slide.description} + + {slide.synopsis} - {slide.isClickable && ( - router.push(slide.buttonLink)} - className="mt-6" - > - {slide.buttonContent} - - )} - - ), - )} + router.push(`/media/${slide.slug}`)} + className="mt-6 h-12 rounded-xl flex gap-2 px-4 hover:bg-neutral-950 group" + > + + + + + Watch Now + + + + + ))} );
- {slide.description} -
- {slide.description} +
+ {slide.synopsis}