mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-13 06:05:22 +00:00
Sort within recursive neighbor enumeration
Test plan: Open the cred explorer, and use the + sign to expand the neighbors. Observe that those neighbors are now sorted by cred. Paired with @wchargin
This commit is contained in:
parent
121b83717f
commit
8a4b9592b1
@ -199,6 +199,12 @@ class RecursiveTable extends React.Component<RTProps, RTState> {
|
||||
});
|
||||
return neighborMap
|
||||
.getAll()
|
||||
.sort((a, b) => {
|
||||
const x = pagerankResult.get(a.address).probability;
|
||||
const y = pagerankResult.get(b.address).probability;
|
||||
return x - y;
|
||||
})
|
||||
.reverse()
|
||||
.map(({address}) => (
|
||||
<RecursiveTable
|
||||
depth={depth + 1}
|
||||
|
Loading…
x
Reference in New Issue
Block a user