"use client"; import { useRef } from "react"; import { RecommendationAnime } from "../../actions/getRecommenationAnime"; import AnimeRecommendationCard from "./components/Card"; import ScrollingButton from "./components/ScrollingButton"; import { Skeleton } from "@/shared/libs/shadcn/ui/skeleton"; const RecommendationClient = ({ result, }: { result: RecommendationAnime[]; }) => { const scrollingContainer = useRef(null); const scrollLeft = () => { console.log("scroll left"); if (scrollingContainer.current) { scrollingContainer.current.scrollBy({ left: -788, behavior: "smooth" }); } }; const scrollRight = () => { console.log("scroll right"); if (scrollingContainer.current) { scrollingContainer.current.scrollBy({ left: 788, behavior: "smooth" }); } }; return (
{result.map((item, index) => ( ))}
); }; export default RecommendationClient;