Skip to content

Commit

Permalink
Fix sorting in accounts preview (#3262)
Browse files Browse the repository at this point in the history
* fix sorting in accounts preview
  • Loading branch information
Amr Elghobary committed Nov 12, 2021
1 parent 24cf73a commit 9f356fa
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/sourcecred/src/ui/components/AccountOverview.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ export const AccountOverview = ({
);

const accounts = useMemo(() => Array.from(ledger.accounts()), []);
const BALANCE_SORT = useMemo(() =>
deepFreeze({
name: Symbol("Current Balance"),
fn: (n) => bigInt(n.balance),
})
const BALANCE_SORT = useMemo(
() =>
deepFreeze({
name: Symbol("Current Balance"),
fn: (n) => bigInt(n.balance),
}),
[]
);

const EARNED_SORT = useMemo(
Expand Down

0 comments on commit 9f356fa

Please sign in to comment.