From 5f2c10d447a199715e59ad6bd78890113baba9a7 Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 10 Jun 2026 10:40:47 +0000 Subject: [PATCH] Update src/components/sections/hero/HeroBillboardFloatingCards.tsx --- .../hero/HeroBillboardFloatingCards.tsx | 180 ------------------ 1 file changed, 180 deletions(-) diff --git a/src/components/sections/hero/HeroBillboardFloatingCards.tsx b/src/components/sections/hero/HeroBillboardFloatingCards.tsx index a887516..e69de29 100644 --- a/src/components/sections/hero/HeroBillboardFloatingCards.tsx +++ b/src/components/sections/hero/HeroBillboardFloatingCards.tsx @@ -1,180 +0,0 @@ -import { useRef } from "react"; -import { useScroll, useTransform, motion } from "motion/react"; -import { Check } from "lucide-react"; -import { cls } from "@/lib/utils"; -import HeroBackgroundSlot from "@/components/ui/HeroBackgroundSlot"; -import Button from "@/components/ui/Button"; -import TextAnimation from "@/components/ui/TextAnimation"; -import AvatarGroup from "@/components/ui/AvatarGroup"; -import ImageOrVideo from "@/components/ui/ImageOrVideo"; -import ScrollReveal from "@/components/ui/ScrollReveal"; - -type FloatingCardPosition = "top-left" | "top-right" | "middle-left" | "middle-right"; - -type HeroBillboardFloatingCardsProps = { - avatarsSrc: string[]; - avatarsLabel: string; - title: string; - description: string; - primaryButton: { text: string; href: string }; - secondaryButton: { text: string; href: string }; - note?: string; - floatingCardsSrc: [string, string, string, string]; - logosSrc?: string[]; -} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); - -const POSITIONS: FloatingCardPosition[] = ["top-left", "top-right", "middle-left", "middle-right"]; - -const FLOATING_CARD_CONFIG: Record = { - "top-left": { - position: "top-8 left-0", - rotation: "-rotate-8", - size: "size-20 xl:size-22 2xl:size-24", - animation: { duration: 4, delay: 0, yOffset: -8, entryDelay: 0.3 }, - }, - "top-right": { - position: "top-4 right-4", - rotation: "rotate-10", - size: "size-18 xl:size-20 2xl:size-22", - animation: { duration: 5, delay: 1, yOffset: -10, entryDelay: 0.5 }, - }, - "middle-left": { - position: "top-1/2 left-2", - rotation: "rotate-6", - size: "size-18 xl:size-20 2xl:size-22", - animation: { duration: 4.5, delay: 0.5, yOffset: -9, entryDelay: 0.7 }, - }, - "middle-right": { - position: "top-1/2 right-0", - rotation: "-rotate-6", - size: "size-20 xl:size-22 2xl:size-24", - animation: { duration: 3.8, delay: 1.5, yOffset: -8, entryDelay: 0.9 }, - }, -}; - -const HeroBillboardFloatingCards = ({ - avatarsSrc, - avatarsLabel, - title, - description, - primaryButton, - secondaryButton, - note, - floatingCardsSrc, - logosSrc, - imageSrc, - videoSrc, -}: HeroBillboardFloatingCardsProps) => { - const containerRef = useRef(null); - const { scrollYProgress } = useScroll({ target: containerRef }); - - const rotate = useTransform(scrollYProgress, [0, 1], [20, 0]); - const scale = useTransform(scrollYProgress, [0, 1], [1.05, 1]); - - return ( -
- -
-
- {POSITIONS.map((position, index) => { - const config = FLOATING_CARD_CONFIG[position]; - const src = floatingCardsSrc[index]; - if (!src) return null; - return ( - - ); - })} - -
-
- -
- - - - - -
-
- - {note && ( - - -
- -
- {note} -
-
- )} -
-
- -
- -
- - - - - - {logosSrc && logosSrc.length > 0 && ( - -
- {[...logosSrc, ...logosSrc, ...logosSrc, ...logosSrc, ...logosSrc, ...logosSrc, ...logosSrc, ...logosSrc].map((logo, index) => ( -
- -
- ))} -
-
- )} -
-
- ); -}; - -export default HeroBillboardFloatingCards;