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 <noreply@anthropic.com>
This commit is contained in:
Arda Samadi 2026-06-27 17:09:58 +03:30
parent 11656c2996
commit 252d3f8f50
3 changed files with 28 additions and 2 deletions

View File

@ -104,6 +104,9 @@ const MainSection = () => {
basePrice: product.basePrice
? parseInt(product.basePrice)
: undefined,
sellerName: product.sellerName,
sellerLogo: product.sellerLogo,
sellerUsername: product.sellerUsername,
};
})}
fetchNextPage={fetchNextPage}

View File

@ -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,
};
}) || []
}

View File

@ -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
*/