From 447fadd19ff9d0827b6e5ec6a2f03956fcb5f499 Mon Sep 17 00:00:00 2001 From: Kentai Radiquum Date: Wed, 20 Nov 2024 23:17:15 +0500 Subject: [PATCH] feat: horizontal episodes scroll with mouse wheel --- .../ReleasePlayer/ReleasePlayer.tsx | 101 +++++++++++------- 1 file changed, 61 insertions(+), 40 deletions(-) diff --git a/app/components/ReleasePlayer/ReleasePlayer.tsx b/app/components/ReleasePlayer/ReleasePlayer.tsx index 635cccd..b1b5a63 100644 --- a/app/components/ReleasePlayer/ReleasePlayer.tsx +++ b/app/components/ReleasePlayer/ReleasePlayer.tsx @@ -5,6 +5,12 @@ import { useUserStore } from "#/store/auth"; import { Card, Dropdown, Button } from "flowbite-react"; import { ENDPOINTS } from "#/api/config"; import { useState, useEffect } from "react"; +import { Swiper, SwiperSlide } from "swiper/react"; +import "swiper/css"; +import "swiper/css/navigation"; +import "swiper/css/mousewheel"; +import "swiper/css/scrollbar"; +import { Navigation, Mousewheel, Scrollbar } from "swiper/modules"; const DropdownTheme = { floating: { @@ -250,48 +256,63 @@ export const ReleasePlayer = (props: { id: number }) => { >
-
+ {episodeInfo.map((episode: any) => ( - + + + ))} -
+
)}