From cc3aa959cc4cab0d31a4cfbbf04bbbefc5effd0b Mon Sep 17 00:00:00 2001 From: bender Date: Mon, 9 Mar 2026 08:22:33 +0000 Subject: [PATCH] Update src/components/sections/team/TeamCardTwo.tsx --- src/components/sections/team/TeamCardTwo.tsx | 258 ++----------------- 1 file changed, 23 insertions(+), 235 deletions(-) diff --git a/src/components/sections/team/TeamCardTwo.tsx b/src/components/sections/team/TeamCardTwo.tsx index d3bb400..742ffea 100644 --- a/src/components/sections/team/TeamCardTwo.tsx +++ b/src/components/sections/team/TeamCardTwo.tsx @@ -1,240 +1,28 @@ -"use client"; - -import { memo } from "react"; -import CardStack from "@/components/cardStack/CardStack"; -import MediaContent from "@/components/shared/MediaContent"; -import { cls } from "@/lib/utils"; -import type { LucideIcon } from "lucide-react"; -import type { ButtonConfig, GridVariant, CardAnimationType, TitleSegment, ButtonAnimationType } from "@/components/cardStack/types"; -import type { TextboxLayout, InvertedBackground } from "@/providers/themeProvider/config/constants"; - -type TeamCardTwoGridVariant = Exclude; - -type SocialLink = { - icon: LucideIcon; - url: string; -}; - -type TeamMember = { - id: string; - name: string; - role: string; - description: string; - imageSrc?: string; - videoSrc?: string; - imageAlt?: string; - videoAriaLabel?: string; - socialLinks?: SocialLink[]; -}; +import React from "react"; +import { CardStack } from "@/components/cardStack/CardStack"; interface TeamCardTwoProps { - members: TeamMember[]; - carouselMode?: "auto" | "buttons"; - gridVariant: TeamCardTwoGridVariant; - uniformGridCustomHeightClasses?: string; - animationType: CardAnimationType; - 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; - nameClassName?: string; - roleClassName?: string; - memberDescriptionClassName?: string; - socialLinksClassName?: string; - socialIconClassName?: string; - gridClassName?: string; - carouselClassName?: string; - controlsClassName?: string; - textBoxClassName?: string; - textBoxTagClassName?: string; - textBoxButtonContainerClassName?: string; - textBoxButtonClassName?: string; - textBoxButtonTextClassName?: string; + members?: any[]; + title?: string; + description?: string; + animationType?: string; + textboxLayout?: string; + useInvertedBackground?: boolean; } -interface TeamMemberCardProps { - member: TeamMember; - cardClassName?: string; - imageClassName?: string; - overlayClassName?: string; - nameClassName?: string; - roleClassName?: string; - memberDescriptionClassName?: string; - socialLinksClassName?: string; - socialIconClassName?: string; +export default function TeamCardTwo({ + members = [], + title = "Team", description = "Our team", animationType = "slide-up", textboxLayout = "default", useInvertedBackground = false, +}: TeamCardTwoProps) { + const items = members.map((member) => ({ + id: member.id, + label: member.name, + detail: member.role, + })); + + return ( +
+ +
+ ); } - -const TeamMemberCard = memo(({ - member, - cardClassName = "", - imageClassName = "", - overlayClassName = "", - nameClassName = "", - roleClassName = "", - memberDescriptionClassName = "", - socialLinksClassName = "", - socialIconClassName = "", -}: TeamMemberCardProps) => { - return ( -
- - -
-
-

- {member.name} -

-
-

- {member.role} -

-
-
- -

- {member.description} -

- - {member.socialLinks && member.socialLinks.length > 0 && ( -
- {member.socialLinks.map((link, index) => ( - - - - ))} -
- )} -
-
- ); -}); - -TeamMemberCard.displayName = "TeamMemberCard"; - -const TeamCardTwo = ({ - members, - carouselMode = "buttons", - gridVariant, - uniformGridCustomHeightClasses = "min-h-95 2xl:min-h-105", - animationType, - title, - titleSegments, - description, - tag, - tagIcon, - tagAnimation, - buttons, - buttonAnimation, - textboxLayout, - useInvertedBackground, - ariaLabel = "Team section", - className = "", - containerClassName = "", - cardClassName = "", - textBoxTitleClassName = "", - textBoxTitleImageWrapperClassName = "", - textBoxTitleImageClassName = "", - textBoxDescriptionClassName = "", - imageClassName = "", - overlayClassName = "", - nameClassName = "", - roleClassName = "", - memberDescriptionClassName = "", - socialLinksClassName = "", - socialIconClassName = "", - gridClassName = "", - carouselClassName = "", - controlsClassName = "", - textBoxClassName = "", - textBoxTagClassName = "", - textBoxButtonContainerClassName = "", - textBoxButtonClassName = "", - textBoxButtonTextClassName = "", -}: TeamCardTwoProps) => { - const customGridRows = (gridVariant === "bento-grid" || gridVariant === "bento-grid-inverted") - ? "md:grid-rows-[22rem_22rem] 2xl:grid-rows-[26rem_26rem]" - : undefined; - - return ( - - {members.map((member, index) => ( - - ))} - - ); -}; - -TeamCardTwo.displayName = "TeamCardTwo"; - -export default TeamCardTwo;