Update src/components/cardStack/layouts/carousels/ButtonCarousel.tsx

This commit is contained in:
2026-03-11 19:40:12 +00:00
parent 93aefd0c57
commit 77ff7ff4d4

View File

@@ -6,10 +6,10 @@ import { useCardAnimation } from '@/components/cardStack/hooks/useCardAnimation'
const ButtonCarousel: React.FC<ButtonCarouselProps> = ({ items, className = '' }) => {
const animation = useCardAnimation();
const itemRefs = React.useRef<(HTMLElement | null)[]>([]);
const itemRefs = React.useRef<(HTMLDivElement | null)[]>([]);
return (
<div ref={animation.bottomContentRef} className={`button-carousel ${className}`}>
<div ref={animation.bottomContentRef as React.Ref<HTMLDivElement>} className={`button-carousel ${className}`}>
{items.map((item, index) => (
<div key={item.id || index} ref={(el) => { if (el) itemRefs.current[index] = el; }} className="carousel-item">
{item.title}