Skip to content

Commit

Permalink
fix: Account names should use natural sort order
Browse files Browse the repository at this point in the history
  • Loading branch information
alfiedotwtf committed Nov 23, 2024
1 parent 7c74b1c commit 571137c
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ export function AccountList({
setShowHidden((s) => !s);
}

const collator = new Intl.Collator(undefined, {
numeric: true,
sensitivity: "base"
});

accounts = accounts.sort((a, b) => collator.compare(a.name, b.name));

return (
<Box.Stack gap="$4">
{isLoading && (
Expand Down

0 comments on commit 571137c

Please sign in to comment.