import type { ReactNode } from "react"; import Link from "next/link"; import { Container } from "@/components/Container"; import { SlotMedia } from "@/components/SlotMedia"; import { categories } from "@/lib/data"; import type { SlotMediaItem } from "@/lib/static-images"; function CardWrap({ href, children }: { href?: string; children: ReactNode }) { const className = "group flex flex-col items-center gap-2 rounded-2xl bg-white p-3 text-center transition hover:-translate-y-0.5"; if (!href) return
{children}
; if (href.startsWith("/") || href.startsWith("#")) { return ( {children} ); } return ( {children} ); } export function FeaturedCategories({ items, aspectRatio, }: { items?: SlotMediaItem[]; aspectRatio?: string; }) { const list: SlotMediaItem[] = items && items.length > 0 ? items : categories.map((category) => ({ id: category.id, image: category.image, href: category.href, title: category.title, })); return (

دسته‌بندی‌های منتخب

خرید سریع از دسته‌های پرمخاطب داروخانه

{list.map((category) => ( {category.title ? ( {category.title} ) : null} ))}
); }