From 252d3f8f501f40aab6e277e1c1f63eacd4d0e73d Mon Sep 17 00:00:00 2001 From: Arda Samadi Date: Sat, 27 Jun 2026 17:09:58 +0330 Subject: [PATCH] feat(search/explore): home-style product tiles with seller brand chip Bring the home product tile to search and explore: seller brand chip (SellerChip) plus price/discount overlay, instead of a bare image. - search: map discountPercent/discountPrice/basePrice + sellerName from ProductSearchResult (sellerName is already returned, so the chip shows now with the initial-letter fallback). - explore: map sellerName/sellerLogo/sellerUsername (and add them to the Product type); these populate once the backend ProductSerializer change ships. Co-Authored-By: Claude Opus 4.8 --- app/components/explore/MainSection.tsx | 3 +++ app/routes/search.$query.tsx | 5 +++++ src/api/types/models/index.ts | 22 ++++++++++++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/app/components/explore/MainSection.tsx b/app/components/explore/MainSection.tsx index 8cd9623..e3c1008 100644 --- a/app/components/explore/MainSection.tsx +++ b/app/components/explore/MainSection.tsx @@ -104,6 +104,9 @@ const MainSection = () => { basePrice: product.basePrice ? parseInt(product.basePrice) : undefined, + sellerName: product.sellerName, + sellerLogo: product.sellerLogo, + sellerUsername: product.sellerUsername, }; })} fetchNextPage={fetchNextPage} diff --git a/app/routes/search.$query.tsx b/app/routes/search.$query.tsx index b2b57d8..8051b38 100644 --- a/app/routes/search.$query.tsx +++ b/app/routes/search.$query.tsx @@ -66,6 +66,11 @@ export default function Search() { id: product.id, title: product.title, images: product.imageUrls || [], + discountPercent: product.discountPercent || 0, + discountPrice: + product.discountPrice || product.price || 0, + basePrice: product.basePrice || product.price || 0, + sellerName: product.sellerName, }; }) || [] } diff --git a/src/api/types/models/index.ts b/src/api/types/models/index.ts index 220b9c1..a5ec8f7 100644 --- a/src/api/types/models/index.ts +++ b/src/api/types/models/index.ts @@ -3310,13 +3310,31 @@ export interface Product { */ category?: string | null; /** - * + * + * @type {string} + * @memberof Product + */ + readonly sellerName?: string; + /** + * + * @type {string} + * @memberof Product + */ + readonly sellerUsername?: string; + /** + * + * @type {string} + * @memberof Product + */ + readonly sellerLogo?: string | null; + /** + * * @type {boolean} * @memberof Product */ readonly isActive?: boolean; /** - * + * * @type {boolean} * @memberof Product */