From f03f76bcd4d9116a0c42b06e65840890aee3ee80 Mon Sep 17 00:00:00 2001 From: Tolu Date: Tue, 10 Dec 2024 14:59:27 +0000 Subject: [PATCH] fix(explorer): sort group response by id in ascending order previously displayed group response objects inconsistently, change offers better readability to users --- apps/explorer/src/app/[network]/page.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/explorer/src/app/[network]/page.tsx b/apps/explorer/src/app/[network]/page.tsx index 7bf4008..f1ca09b 100644 --- a/apps/explorer/src/app/[network]/page.tsx +++ b/apps/explorer/src/app/[network]/page.tsx @@ -25,8 +25,10 @@ export default function Network() { validatedProofs: true }) - setAllGroups(groups) - setFilteredGroups(groups.slice()) + const sortedGroups = groups.sort((a, b) => parseInt(a.id, 10) - parseInt(b.id, 10)) + + setAllGroups(sortedGroups) + setFilteredGroups(sortedGroups.slice()) setLoading(false) }