Wire Meshkee storefront: static images, store-items, guest cart, and auth.

Connect homepage slots and specials, switch catalog to store-items, add the customer-portal mini-cart and account menu, and publish the static-image slot catalog.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-09-30 09:31:07 +03:30
co-authored by Cursor
parent a60e84a2b2
commit 9e2dc2c61d
40 changed files with 2154 additions and 831 deletions
+15 -4
View File
@@ -2,18 +2,22 @@ import Image from "next/image";
import Link from "next/link";
import CartPopover from "./CartPopover";
import ProfileMenu from "./ProfileMenu";
import ProductsMegaMenu from "./ProductsMegaMenu";
import { buildCategoryTree } from "@/lib/categories";
import { meshkee } from "@/lib/meshkee";
const navLinks = [
{ href: "/", label: "صفحه اصلی" },
{ href: "/products", label: "محصولات" },
{ href: "/blog", label: "بلاگ" },
{ href: "/satisfaction", label: "مشتریان راضی" },
{ href: "/purchaseguide", label: "راهنمای خرید" },
];
export default function Header() {
export default async function Header() {
const categoriesRes = await meshkee.getCategories("product").catch(() => ({ items: [] }));
const categories = buildCategoryTree(categoriesRes.items);
return (
<header className="sticky top-0 z-50 h-16 border-b border-black/10 bg-white shadow-[0_2px_10px_rgba(0,0,0,0.06)]">
<header className="relative sticky top-0 z-50 h-16 border-b border-black/10 bg-white shadow-[0_2px_10px_rgba(0,0,0,0.06)]">
<div className="mx-auto flex h-full max-w-7xl items-center justify-between gap-6 px-4 sm:px-6 lg:px-8">
<Link href="/" className="shrink-0">
<Image
@@ -27,6 +31,13 @@ export default function Header() {
</Link>
<nav className="hidden items-center gap-7 lg:flex">
<Link
href="/"
className="text-sm font-medium text-neutral-700 transition-colors hover:text-primary"
>
صفحه اصلی
</Link>
<ProductsMegaMenu categories={categories} />
{navLinks.map((link) => (
<Link
key={link.label}