"use client"; import { motion, useSpring } from "framer-motion"; import React, { useState } from "react"; import { cn } from "@/lib/utils"; interface Awards5Props { className?: string; } const faOrder = (index: number) => (index + 1).toLocaleString("fa-IR"); const Awards5 = ({ className }: Awards5Props) => { const SPRING = { mass: 0.1, stiffness: 100, damping: 10, }; const xSpring = useSpring(0, SPRING); const ySpring = useSpring(0, SPRING); const scaleSpring = useSpring(0, SPRING); const opacity = useSpring(0, SPRING); const awards = [ { title: "جایزه همکاری خلاقانه", url: "#", image: "/block-media/shadcnblocks/block/guri4/img1.png", }, { title: "جایزه تعالی طراحی", url: "#", image: "/block-media/shadcnblocks/block/guri4/img2.png", }, { title: "نوآوری در توسعه وب", url: "#", image: "/block-media/shadcnblocks/block/guri4/img3.png", }, { title: "بهترین طراحی تجربه کاربری", url: "#", image: "/block-media/shadcnblocks/block/guri4/img4.png", }, { title: "طراحی بصری برجسته", url: "#", image: "/block-media/shadcnblocks/block/guri4/img5.png", }, { title: "جایزه نوآوری دیجیتال", url: "#", image: "/block-media/shadcnblocks/block/guri4/img6.png", }, ]; const handlePointerMove = (e: React.PointerEvent) => { const bounds = e.currentTarget.getBoundingClientRect(); xSpring.set(e.clientX - bounds.left + 20); ySpring.set(e.clientY - bounds.top + 20); }; const [currentIndex, setCurrentIndex] = useState(0); return (

{Number(5).toLocaleString("fa-IR")} جوایز

    { opacity.set(1); scaleSpring.set(1); }} onPointerLeave={() => { opacity.set(0); scaleSpring.set(0); }} className="relative col-span-4 w-full" > {awards.map((award, index) => (
  • { setCurrentIndex(index); }} className="group relative flex cursor-pointer items-center justify-between border-b py-5" >

    {award.title} {faOrder(index)}

    مشاهده جایزه
  • ))} {awards[currentIndex].title}
); }; export { Awards5 };