Skip to content

Commit 72590e7

Browse files
authored
fix(explorer): sort group response by id in ascending order (#28)
previously displayed group response objects inconsistently, change offers better readability to users
1 parent b52e07f commit 72590e7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/explorer/src/app/[network]/page.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ export default function Network() {
2525
validatedProofs: true
2626
})
2727

28-
setAllGroups(groups)
29-
setFilteredGroups(groups.slice())
28+
const sortedGroups = groups.sort((a, b) => parseInt(a.id, 10) - parseInt(b.id, 10))
29+
30+
setAllGroups(sortedGroups)
31+
setFilteredGroups(sortedGroups.slice())
3032
setLoading(false)
3133
}
3234

0 commit comments

Comments
 (0)