Skip to content

Commit 2e40387

Browse files
authored
Merge pull request #1008 from bcgov/dev
Sort products by name alphabetically (#1007)
2 parents e67727f + b42c6f8 commit 2e40387

File tree

1 file changed

+1
-1
lines changed
  • src/nextapp/pages/devportal/api-directory

1 file changed

+1
-1
lines changed

src/nextapp/pages/devportal/api-directory/[id].tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ const ApiPage: React.FC<
150150
</Box>
151151
<Card heading="Products">
152152
<Box bg="gray.100">
153-
{data?.products?.map((p) => (
153+
{data?.products?.sort((a,b) => (a.name > b.name) ? 1 : ((b.name > a.name) ? -1 : 0)).map((p) => (
154154
<ApiProductItem
155155
key={uid(p)}
156156
data={p}

0 commit comments

Comments
 (0)