Skip to content

Commit

Permalink
Group club badges by color
Browse files Browse the repository at this point in the history
  • Loading branch information
aviupadhyayula committed Sep 1, 2024
1 parent 0b9a9cf commit 548ac5f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions frontend/components/common/TagGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export const TagGroup = ({ tags = [] }: TagGroupProps): ReactElement | null => {
.sort((a, b) => {
if (isBadge(a) && !isBadge(b)) return 1
if (!isBadge(a) && isBadge(b)) return -1
if (isBadge(a) && isBadge(b)) {
// badges should be sorted by color
return a.color.localeCompare(b.color)
}
return 0
})
.map((tag) =>
Expand Down

0 comments on commit 548ac5f

Please sign in to comment.