Skip to content

Commit

Permalink
change from lexical to numeric sort
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisibrahimd committed Aug 26, 2022
1 parent 75e1fb7 commit da6dff7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/scoreboard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ export default function Scoreboard() {
const dataKeysArray = Array.from(dataKeys);
const teamNames = Array.from(teamNamesSet);
dataKeysArray.sort();
teamNames.sort();

const collator = new Intl.Collator([], {numeric: true});
teamNames.sort((a, b) => collator.compare(a, b));

return (
<>
Expand Down

0 comments on commit da6dff7

Please sign in to comment.