From a67b11b713804ef4605c3eb7713c240707b4e530 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 10 Jun 2026 10:40:48 +0000 Subject: [PATCH] Update src/components/sections/hero/HeroSplitTestimonial.tsx --- .../sections/hero/HeroSplitTestimonial.tsx | 128 ------------------ 1 file changed, 128 deletions(-) diff --git a/src/components/sections/hero/HeroSplitTestimonial.tsx b/src/components/sections/hero/HeroSplitTestimonial.tsx index fc426e5..e69de29 100644 --- a/src/components/sections/hero/HeroSplitTestimonial.tsx +++ b/src/components/sections/hero/HeroSplitTestimonial.tsx @@ -1,128 +0,0 @@ -import { useEffect, useState } from "react"; -import { Star } from "lucide-react"; -import { motion, AnimatePresence } from "motion/react"; -import { cls } from "@/lib/utils"; -import Button from "@/components/ui/Button"; -import HeroBackgroundSlot from "@/components/ui/HeroBackgroundSlot"; -import TextAnimation from "@/components/ui/TextAnimation"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import ScrollReveal from "@/components/ui/ScrollReveal"; - -type Testimonial = { - name: string; - handle: string; - text: string; - rating: number; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); - -type HeroSplitTestimonialProps = { - tag: string; - title: string; - description: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: string }; - testimonials: Testimonial[]; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); - -const INTERVAL = 5000; - -const HeroSplitTestimonial = ({ - tag, - title, - description, - primaryButton, - secondaryButton, - imageSrc, - videoSrc, - testimonials, -}: HeroSplitTestimonialProps) => { - const [currentIndex, setCurrentIndex] = useState(0); - - useEffect(() => { - if (testimonials.length <= 1) return; - - const interval = setInterval(() => { - setCurrentIndex((prev) => (prev + 1) % testimonials.length); - }, INTERVAL); - return () => clearInterval(interval); - }, [currentIndex, testimonials.length]); - - const testimonial = testimonials[currentIndex]; - - return ( -
- -
-
-
-
-

{tag}

-
- - - - - -
-
-
-
- - - - - - -
- {Array.from({ length: 5 }).map((_, index) => ( - - ))} -
- -

{testimonial.text}

- -
- -
- {testimonial.name} - {testimonial.handle} -
-
-
-
-
-
-
- ); -}; - -export default HeroSplitTestimonial;