Connect product/blog pages, mega menu, and instant search to Meshkee backend

Add /products (list + detail) and /blog (list + detail) routes backed by
the real Meshkee API, a real category-hierarchy mega menu (level 2/3 only),
debounced instant search proxied through a same-origin API route, and
tel:-link fallbacks on product cards when no price is set. Also fixes
Product price normalization to read the real API shape instead of a
guessed one, and hardens product linking against catalog sources that
don't expose a slug.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
amirhosein.ashourloo
2026-08-18 13:42:08 +03:30
co-authored by Claude Sonnet 5
parent 1f81236d0a
commit 2b5f4e437b
19 changed files with 1018 additions and 175 deletions
+10 -2
View File
@@ -2,9 +2,15 @@ import { Carousel } from "@/components/ui/Carousel";
import { ProductCard } from "@/components/ui/ProductCard";
import { SectionTitle } from "@/components/ui/SectionTitle";
import { EmptyState } from "@/components/ui/EmptyState";
import type { ProductGroup } from "@/lib/meshkee";
import { productHref, type ProductGroup } from "@/lib/meshkee";
export function BrandGroupCarousels({ brandGroups }: { brandGroups: ProductGroup[] }) {
export function BrandGroupCarousels({
brandGroups,
contactPhone,
}: {
brandGroups: ProductGroup[];
contactPhone?: string;
}) {
if (brandGroups.length === 0) {
return (
<section className="py-10 md:py-14">
@@ -31,6 +37,8 @@ export function BrandGroupCarousels({ brandGroups }: { brandGroups: ProductGroup
price={product.price}
image={product.image ?? "/images/placeholder.svg"}
variant="brand"
href={productHref(product)}
contactPhone={contactPhone}
/>
))}
</Carousel>