Skip to content

Commit

Permalink
Merge pull request #1008 from bcgov/dev
Browse files Browse the repository at this point in the history
Sort products by name alphabetically (#1007)
  • Loading branch information
ikethecoder authored Mar 7, 2024
2 parents e67727f + b42c6f8 commit 2e40387
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nextapp/pages/devportal/api-directory/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ const ApiPage: React.FC<
</Box>
<Card heading="Products">
<Box bg="gray.100">
{data?.products?.map((p) => (
{data?.products?.sort((a,b) => (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0)).map((p) => (
<ApiProductItem
key={uid(p)}
data={p}
Expand Down

0 comments on commit 2e40387

Please sign in to comment.