Add mega menu, filter selects, and technical specs table.

Improve navigation with grouped category mega menu, polish product filters, and render technical values as a table instead of raw JSON.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-19 23:20:19 +03:30
co-authored by Cursor
parent 184d2f1ea4
commit 386787b4b5
12 changed files with 545 additions and 143 deletions
+7 -1
View File
@@ -7,6 +7,7 @@ import { ProductTabs } from "@/components/ProductTabs";
import { Products } from "@/components/Products";
import { SiteShell } from "@/components/SiteShell";
import { site } from "@/data/home";
import { getCategoryVariationFieldMap } from "@/lib/api/product-fields";
import {
formatCondition,
formatPrice,
@@ -48,6 +49,10 @@ export default async function UserProductDetailPage({ params }: PageProps) {
const country = product.countryNameFa || product.countryName || null;
const description =
product.descriptionFa || product.description || product.descriptionEn;
const deliveryNotes = product.deliveryNotes ?? product.deliveryNote ?? null;
const technicalFieldLabels = await getCategoryVariationFieldMap(
product.categoryId,
);
const similarResult = product.categoryId
? await listUserProducts({
@@ -142,8 +147,9 @@ export default async function UserProductDetailPage({ params }: PageProps) {
<ProductTabs
description={description}
technicalNotes={product.technicalNotes}
deliveryNotes={product.deliveryNotes}
deliveryNotes={deliveryNotes}
technicalValues={product.technicalValues}
technicalFieldLabels={technicalFieldLabels}
/>
{similarProducts.length > 0 ? (