@@ -12,7 +12,7 @@ import { getFilterParsers } from '@/vibes/soul/sections/products-list-section/fi
1212import { getSessionCustomerAccessToken } from '~/auth' ;
1313import { facetsTransformer } from '~/data-transformers/facets-transformer' ;
1414import { pageInfoTransformer } from '~/data-transformers/page-info-transformer' ;
15- import { pricesTransformer } from '~/data-transformers/prices -transformer' ;
15+ import { productCardTransformer } from '~/data-transformers/product-card -transformer' ;
1616import { getPreferredCurrencyCode } from '~/lib/currency' ;
1717
1818import { MAX_COMPARE_LIMIT } from '../../../compare/page-data' ;
@@ -145,16 +145,15 @@ export default async function Category(props: Props) {
145145 const search = await streamableFacetedSearch ;
146146 const products = search . products . items ;
147147
148- return products . map ( ( product ) => ( {
149- id : product . entityId . toString ( ) ,
150- title : product . name ,
151- href : product . path ,
152- image : product . defaultImage
153- ? { src : product . defaultImage . url , alt : product . defaultImage . altText }
154- : undefined ,
155- price : pricesTransformer ( product . prices , format ) ,
156- subtitle : product . brand ?. name ?? undefined ,
157- } ) ) ;
148+ const { defaultOutOfStockMessage, showOutOfStockMessage, showBackorderMessage } =
149+ settings ?. inventory || { } ;
150+
151+ return productCardTransformer (
152+ products ,
153+ format ,
154+ showOutOfStockMessage ? defaultOutOfStockMessage : undefined ,
155+ showBackorderMessage ,
156+ ) ;
158157 } ) ;
159158
160159 const streamableTotalCount = Streamable . from ( async ( ) => {
0 commit comments