'use client'; import { useEffect, useRef } from 'react'; import Glide from '@glidejs/glide'; import Icon from '@/components/Icon'; const sliderConfiguration = { gap: 0, perView: 1, type: 'carousel', autoplay: 7000, animationDuration: 1000, }; export default function Slider({ slides = [], style = {}, }: { slides: React.ReactNode[] style?: React.CSSProperties }) { const wrapper = useRef(null); useEffect(() => { const glide = new Glide(wrapper.current, sliderConfiguration).mount(); return () => glide.destroy(); }, []); return (
    {slides.map((slide, i) => (
  • {slide}
  • ))}
); }