// ─── DashboardGrid.jsx ───────────────────────────────────────────────────────── import { useNavigate } from "react-router-dom"; import { motion } from "framer-motion"; export default function DashboardGrid({ sections = [] }) { const navigate = useNavigate(); const handleNavigate = (e, link) => { e.preventDefault() navigate(link) } return (
{sections.map(({ title, description, tiles }) => (
{/* Header */}

{title}

{description}

{/* Tiles */}
{tiles.map(({ key, label, icon: Icon, link }) => ( handleNavigate(e, link)} className="group bg-card hover:bg-primary border rounded-lg relative overflow-hidden flex flex-col h-54 cursor-pointer transition-colors duration-200 ease-out" whileHover={{ y: -6, scale: 1.02 }} transition={{ y: { type: "spring", stiffness: 300, damping: 20 }, scale: { type: "spring", stiffness: 300, damping: 20 }, }} > {label} ))}
))}
) }