import { cn } from "@/lib/utils" import Image from "next/image" import Link from "next/link" import { resolveIconPath } from "@/types/navigation" interface ResourceCardProps { title: string description?: string icon?: string url: string className?: string } export default function ResourceCard({ title, description, icon, url, className }: ResourceCardProps) { // 使用 resolveIconPath 解析图标路径 const resolvedIcon = resolveIconPath(icon) return (
{resolvedIcon && (
{title} { console.warn(`Failed to load icon for ${title}:`, resolvedIcon) e.currentTarget.style.display = 'none' }} />
)}

{title}

{description && (

{description}

)}
) }