"use client"; import { useState } from "react"; import { motion, PanInfo } from "framer-motion"; import { ArrowDown, FileText, Send, Hand } from "lucide-react"; import { useTranslations } from "next-intl"; const PROFILE_IMAGES = [ "https://images.unsplash.com/photo-1556157382-97eda2d62296?w=600&auto=format&fit=crop&q=80", "https://images.unsplash.com/photo-1573496359142-b8d87734a5a2?w=600&auto=format&fit=crop&q=80", "https://images.unsplash.com/photo-1605379399642-870262d3d051?w=600&auto=format&fit=crop&q=80", ]; export function HeroSection() { const t = useTranslations("Hero"); const [cards, setCards] = useState(PROFILE_IMAGES); const handleDragEnd = (event: any, info: PanInfo) => { // If the card is dragged beyond a certain threshold on X-axis (left or right) if (Math.abs(info.offset.x) > 100) { setCards((prevCards) => { const newCards = [...prevCards]; const topCard = newCards.shift(); if (topCard) newCards.push(topCard); return newCards; }); } }; return (
{/* Decorative Blur Backgrounds */}
{/* LEFT: Text Content */}
{t("badge")} {t("greeting")}{" "} {t("name")} {t("titlePart1")}{" "} {t("titleHighlight")}
{t("titlePart2")}
{t("yearsExp")} {" "} {t("subtitle")} {t("ctaContact")} {t("ctaProjects")}
{/* RIGHT: Swipeable Card Deck */}
{cards.map((imgUrl, index) => { const isTop = index === 0; return ( Yolando Showcase {/* Instructional Overlay only on top card */} {isTop && (
Swipe
)}
); })}
{t("scroll")}
); }