Skip to content

Commit 8c6e5a3

Browse files
authored
alphabetize dropdown (#58069)
1 parent f41f1d3 commit 8c6e5a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/landings/components/shared/LandingArticleGridWithFilter.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ export const ArticleGrid = ({ flatArticles }: ArticleGridProps) => {
6161
// Extract unique categories from the articles
6262
const categories: string[] = [
6363
ALL_CATEGORIES,
64-
...new Set(flatArticles.flatMap((item) => item.category || [])),
64+
...Array.from(new Set(flatArticles.flatMap((item) => item.category || []))).sort((a, b) =>
65+
a.localeCompare(b),
66+
),
6567
]
6668

6769
const applyFilters = () => {

0 commit comments

Comments
 (0)