Skip to content

Commit f9437cc

Browse files
committed
sort catalog aphabetically
1 parent 5673ed9 commit f9437cc

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/ui/screens/eligibilty-overview/components/EligibilityOverviewList.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,17 @@ const EligibilityOverviewList = ({ t, items, eligible, iconPath }) => {
1717
}
1818
})();
1919

20+
const sortedItems = [...items].sort((a, b) =>
21+
a.title.toLowerCase() < b.title.toLowerCase() ? -1 : 1
22+
);
23+
2024
return (
2125
<VBox sx={{ gap: 2 }}>
2226
<Typography variant="h6">
2327
{headerText}
2428
</Typography>
2529
<VBox sx={{ gap: 2 }}>
26-
{items.map((item, index) => (
30+
{sortedItems.map((item, index) => (
2731
<EligibilityOverviewItem t={t} key={index} item={item} eligible={eligible} iconPath={iconPath}/>
2832
))}
2933
</VBox>

0 commit comments

Comments
 (0)