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

This commit is contained in:
2026-10-25 15:05:11 +00:00
parent 8045362852
commit 037a525f91
8 changed files with 25 additions and 15 deletions

View File

@@ -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)];
}