"use client" import { useState } from "react" import { motion } from "framer-motion" import Image from "next/image" export const AnimatedTooltip = ({ items, }: { items: { id: number name: string designation: string image: string }[] }) => { const [hoveredIndex, setHoveredIndex] = useState(null) return (
{items.map((item, idx) => (
setHoveredIndex(idx)} onMouseLeave={() => setHoveredIndex(null)} >
{item.name}
{hoveredIndex === idx && (
{item.name}
{item.designation}
)}
))}
) }