mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Sort products by available_on when using the Trending sorting in useSearch
This commit is contained in:
@@ -7,7 +7,7 @@ import type { GraphQLFetcherResult } from '@commerce/api'
|
||||
import { IProducts } from '@spree/storefront-api-v2-sdk/types/interfaces/Product'
|
||||
|
||||
const nextToSpreeSortMap: { [key: string]: string } = {
|
||||
'trending-desc': 'updated_at', // FIXME: Spree has no "trending" filter. Using updated_at.
|
||||
'trending-desc': 'available_on',
|
||||
'latest-desc': 'updated_at',
|
||||
'price-asc': 'price',
|
||||
'price-desc': '-price',
|
||||
|
Reference in New Issue
Block a user