From bb5328d0ca30d6ca67755bc7dad03f19cbbf2315 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 11 Mar 2026 20:06:44 +0000 Subject: [PATCH] Update src/components/sections/testimonial/TestimonialCardOne.tsx --- .../testimonial/TestimonialCardOne.tsx | 257 +++--------------- 1 file changed, 45 insertions(+), 212 deletions(-) diff --git a/src/components/sections/testimonial/TestimonialCardOne.tsx b/src/components/sections/testimonial/TestimonialCardOne.tsx index 63006ee..c2fb4c3 100644 --- a/src/components/sections/testimonial/TestimonialCardOne.tsx +++ b/src/components/sections/testimonial/TestimonialCardOne.tsx @@ -1,219 +1,52 @@ -"use client"; - -import { memo } from "react"; -import CardStack from "@/components/cardStack/CardStack"; -import MediaContent from "@/components/shared/MediaContent"; -import { cls } from "@/lib/utils"; -import { Star } from "lucide-react"; -import type { LucideIcon } from "lucide-react"; -import type { ButtonConfig, ButtonAnimationType, CardAnimationTypeWith3D, GridVariant, TitleSegment, TextboxLayout, InvertedBackground } from "@/components/cardStack/types"; - -type Testimonial = { - id: string; - name: string; - role: string; - company: string; - rating: number; - imageSrc?: string; - videoSrc?: string; - imageAlt?: string; - videoAriaLabel?: string; -}; +import React from 'react'; +import { CardStack } from '@/components/cardStack/CardStack'; interface TestimonialCardOneProps { - testimonials: Testimonial[]; - carouselMode?: "auto" | "buttons"; - uniformGridCustomHeightClasses?: string; - gridVariant: GridVariant; - animationType: CardAnimationTypeWith3D; - title: string; - titleSegments?: TitleSegment[]; - description: string; - tag?: string; - tagIcon?: LucideIcon; - tagAnimation?: ButtonAnimationType; - buttons?: ButtonConfig[]; - buttonAnimation?: ButtonAnimationType; - textboxLayout: TextboxLayout; - useInvertedBackground: InvertedBackground; - ariaLabel?: string; - className?: string; - containerClassName?: string; - cardClassName?: string; - textBoxTitleClassName?: string; - textBoxTitleImageWrapperClassName?: string; - textBoxTitleImageClassName?: string; - textBoxDescriptionClassName?: string; - imageClassName?: string; - overlayClassName?: string; - ratingClassName?: string; - nameClassName?: string; - roleClassName?: string; - companyClassName?: string; - gridClassName?: string; - carouselClassName?: string; - controlsClassName?: string; - textBoxClassName?: string; - textBoxTagClassName?: string; - textBoxButtonContainerClassName?: string; - textBoxButtonClassName?: string; - textBoxButtonTextClassName?: string; + testimonials: Array<{ + id: string; + name: string; + imageSrc: string; + imageAlt?: string; + }>; + title: string; + description: string; + gridVariant?: string; + animationType?: string; + textboxLayout?: string; + useInvertedBackground?: boolean; + [key: string]: any; } -interface TestimonialCardProps { - testimonial: Testimonial; - cardClassName?: string; - imageClassName?: string; - overlayClassName?: string; - ratingClassName?: string; - nameClassName?: string; - roleClassName?: string; - companyClassName?: string; -} +const TestimonialCardOne: React.FC = ({ + testimonials, + title, + description, + gridVariant = 'uniform-all-items-equal', + animationType = 'slide-up', + textboxLayout = 'default', + useInvertedBackground = false, + ...props +}) => { + const testimonialItems = testimonials.map((testimonial) => ( +
+ {testimonial.imageAlt +

{testimonial.name}

+
+ )); -const TestimonialCard = memo(({ - testimonial, - cardClassName = "", - imageClassName = "", - overlayClassName = "", - ratingClassName = "", - nameClassName = "", - roleClassName = "", - companyClassName = "", -}: TestimonialCardProps) => { - return ( -
- - -
-
- {Array.from({ length: 5 }).map((_, index) => ( - - ))} -
- -

- {testimonial.name} -

- -
-

- {testimonial.role} -

-

- {testimonial.company} -

-
-
-
- ); -}); - -TestimonialCard.displayName = "TestimonialCard"; - -const TestimonialCardOne = ({ - testimonials, - carouselMode = "buttons", - uniformGridCustomHeightClasses = "min-h-95 2xl:min-h-105", - gridVariant, - animationType, - title, - titleSegments, - description, - tag, - tagIcon, - tagAnimation, - buttons, - buttonAnimation, - textboxLayout, - useInvertedBackground, - ariaLabel = "Testimonials section", - className = "", - containerClassName = "", - cardClassName = "", - textBoxTitleClassName = "", - textBoxTitleImageWrapperClassName = "", - textBoxTitleImageClassName = "", - textBoxDescriptionClassName = "", - imageClassName = "", - overlayClassName = "", - ratingClassName = "", - nameClassName = "", - roleClassName = "", - companyClassName = "", - gridClassName = "", - carouselClassName = "", - controlsClassName = "", - textBoxClassName = "", - textBoxTagClassName = "", - textBoxButtonContainerClassName = "", - textBoxButtonClassName = "", - textBoxButtonTextClassName = "", -}: TestimonialCardOneProps) => { - return ( - - {testimonials.map((testimonial, index) => ( - - ))} - - ); + return ( + + {testimonialItems} + + ); }; -TestimonialCardOne.displayName = "TestimonialCardOne"; - -export default TestimonialCardOne; +export default TestimonialCardOne; \ No newline at end of file