Route partnership CTA to the store account and polish search modal.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-09-27 21:51:44 +03:30
co-authored by Cursor
parent fa248d2f6a
commit f44058bd6e
7 changed files with 200 additions and 216 deletions
+1 -13
View File
@@ -172,7 +172,6 @@ export default async function CategoryPage({ params, searchParams }: PageProps)
products,
query.page,
);
const hasExtraFilters = Boolean(query.q || query.min || query.max);
return (
<main className="home-page min-h-dvh bg-white text-ink">
@@ -202,18 +201,7 @@ export default async function CategoryPage({ params, searchParams }: PageProps)
/>
<div className="space-y-3 sm:space-y-4">
{total === 0 ? (
<ProductEmptyState
title={
hasExtraFilters
? "محصولی با این فیلترها پیدا نشد"
: `محصولی در «${resolved.nameFa}» نیست`
}
description={
hasExtraFilters
? "فیلترها را تغییر دهید یا همه را پاک کنید تا محصولات بیشتری ببینید."
: "به‌زودی محصولات این دسته اضافه می‌شوند."
}
/>
<ProductEmptyState />
) : (
<>
<ProductGrid products={pageItems} />
+7
View File
@@ -0,0 +1,7 @@
import { redirect } from "next/navigation";
import { STORE_URL } from "@/lib/public-api";
/** Partnership form lives in the customer dashboard (auth already shared). */
export default function PartnersPage() {
redirect(`${STORE_URL}/account/partners`);
}
+1 -15
View File
@@ -92,9 +92,6 @@ export default async function ProductsPage({ searchParams }: PageProps) {
const categoryLabel = query.cat
? findCategoryName(apiCategories, query.cat)
: null;
const hasFilters = Boolean(
query.q || query.cat || query.min || query.max || query.sale,
);
const heroTitle = query.sale
? "فروش ویژه"
@@ -152,18 +149,7 @@ export default async function ProductsPage({ searchParams }: PageProps) {
/>
<div className="space-y-3 sm:space-y-4">
{total === 0 ? (
<ProductEmptyState
title={
hasFilters
? "محصولی با این فیلترها پیدا نشد"
: "محصولی موجود نیست"
}
description={
hasFilters
? "فیلترها را تغییر دهید یا همه را پاک کنید تا محصولات بیشتری ببینید."
: "به‌زودی محصولات جدید اضافه می‌شوند."
}
/>
<ProductEmptyState />
) : (
<>
<ProductGrid products={pageItems} />