Wire Meshkee catalog: products, blog, mega menu, and product search.

Catalog-only (no cart); search targets store items and products pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-21 16:04:31 +03:30
co-authored by Cursor
parent cfa21cbee9
commit 8e14748b48
29 changed files with 1460 additions and 244 deletions
+19
View File
@@ -0,0 +1,19 @@
import { meshkeeApiBase, websiteDomain } from "@/lib/config";
export async function GET(request: Request) {
const url = new URL(request.url);
const query = url.searchParams.get("q")?.trim() ?? "";
if (query.length <= 2) {
return Response.json({ items: [] });
}
try {
const response = await fetch(
`${meshkeeApiBase}/tenants/${encodeURIComponent(websiteDomain)}/store-items?name=${encodeURIComponent(query)}&pageSize=8`,
{ cache: "no-store" },
);
return Response.json(await response.json());
} catch {
return Response.json({ items: [] });
}
}