spotters: brands, makers and operators with a logo first, activity order kept inside each group
All checks were successful
Deploy production / deploy (push) Successful in 1m6s
All checks were successful
Deploy production / deploy (push) Successful in 1m6s
This commit is contained in:
@@ -161,3 +161,8 @@ export function rankByActivity<T extends { id: number }>(tiles: T[], act: Map<nu
|
||||
.sort((a, b) => b.s - a.s || a.i - b.i)
|
||||
.map((x) => x.t);
|
||||
}
|
||||
|
||||
/** Brands/makers/operators with a logo first; keeps the incoming order inside each group. */
|
||||
export function logoFirst<T extends { logo: string | null }>(tiles: T[]) {
|
||||
return [...tiles.filter((t) => t.logo), ...tiles.filter((t) => !t.logo)];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user