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:
parent
11656c2996
commit
252d3f8f50
@ -104,6 +104,9 @@ const MainSection = () => {
|
||||
basePrice: product.basePrice
|
||||
? parseInt(product.basePrice)
|
||||
: undefined,
|
||||
sellerName: product.sellerName,
|
||||
sellerLogo: product.sellerLogo,
|
||||
sellerUsername: product.sellerUsername,
|
||||
};
|
||||
})}
|
||||
fetchNextPage={fetchNextPage}
|
||||
|
||||
@ -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,
|
||||
};
|
||||
}) || []
|
||||
}
|
||||
|
||||
@ -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
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user