Skip to content

Commit 87b2062

Browse files
authored
Filter by MMR in Team Builder (#54)
* Team Builder page * Search bar * Player type * Type filter * Filter by MMR
1 parent f3b069d commit 87b2062

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/pages/teamBuilder.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ export function TeamBuilder() {
5454
label: `${statDescriptionsShort[key as keyof typeof statDescriptionsShort] ?? key} (${key})`,
5555
group: "Extended",
5656
}));
57-
return [...coreOptions, ...extOptions].sort((a, b) => a.label.localeCompare(b.label));
57+
const mmrOption = { value: "mmr", label: "MMR (mmr)", group: "Core" };
58+
return [mmrOption, ...coreOptions, ...extOptions].sort((a, b) => a.label.localeCompare(b.label));
5859
}, [extendedKeys]);
5960

6061
// Helper to read stat value from player
6162
const getStatValue = (player: Player, key?: string): any => {
6263
if (!key) return undefined;
64+
if (key === "mmr") return player.mmr;
6365
// core stat
6466
if (key in PlayerMappings) {
6567
return (player.stats as any)?.[key];

0 commit comments

Comments
 (0)