cars: default to most-common-in-NL order; dex numbers oldest first with unknown years last (--renumber)
All checks were successful
Deploy production / deploy (push) Successful in 2m41s
All checks were successful
Deploy production / deploy (push) Successful in 2m41s
This commit is contained in:
@@ -24,8 +24,8 @@ export const BODIES = [
|
||||
] as const;
|
||||
export const DRIVES = ['fwd', 'rwd', 'awd', '4wd'] as const;
|
||||
export const SORTS = {
|
||||
dex: 'dex #',
|
||||
popular: 'most common in NL',
|
||||
dex: 'dex #',
|
||||
name: 'name',
|
||||
newest: 'newest',
|
||||
oldest: 'oldest',
|
||||
|
||||
@@ -38,7 +38,7 @@ export function parseFilters(params: URLSearchParams): CarFilters {
|
||||
market: pick(params.get('market'), ['nl', 'us'] as const),
|
||||
from: year(params.get('from')),
|
||||
to: year(params.get('to')),
|
||||
sort: sort && sort in SORTS ? (sort as CarSort) : 'dex',
|
||||
sort: sort && sort in SORTS ? (sort as CarSort) : 'popular',
|
||||
page: Math.min(Math.max(1, Math.floor(Number(params.get('page')) || 1)), 1000)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
const quick = [
|
||||
{ label: '🔥 most common in NL', params: { sort: 'popular', market: 'nl' } },
|
||||
{ label: '📖 dex order', params: { sort: 'dex' } },
|
||||
{ label: '⚡ electric', params: { fuel: 'electric', sort: 'popular' } },
|
||||
{ label: '🍃 hybrids', params: { fuel: 'hybrid', sort: 'popular' } },
|
||||
{ label: '🏎️ coupés', params: { body: 'coupe', sort: 'popular' } },
|
||||
|
||||
Reference in New Issue
Block a user