"use client"; import Link from "next/link"; import { useState } from "react"; import { buildCategoryTree, categoryLabel } from "@/lib/meshkee/format"; import type { Category } from "@/lib/meshkee/types"; import { storeCategoryHref } from "@/lib/meshkee/urls"; export function ProductsMegaMenu({ categories }: { categories: Category[] }) { const [open, setOpen] = useState(false); const tree = buildCategoryTree(categories).filter( (node) => node.children.length > 0 || !node.parentId, ); const withChildren = tree.filter((node) => node.children.length > 0); const leafParents = tree.filter((node) => node.children.length === 0); return (
دستهبندیای برای نمایش وجود ندارد.
) : ( <>More