"use client"; import { ReactNode, useRef } from "react"; export default function Carousel({ children, title, subtitle, }: { children: ReactNode; title?: string; subtitle?: string; }) { const ref = useRef(null); const scroll = (dir: number) => { ref.current?.scrollBy({ left: dir * 320, behavior: "smooth" }); }; return (
{title &&

{title}

} {subtitle &&

{subtitle}

}
{[-1, 1].map((d) => ( ))}
{children}
); }