Skip to content

Commit

Permalink
feat: sort collabie roles in query
Browse files Browse the repository at this point in the history
  • Loading branch information
mxmason committed Jun 13, 2023
1 parent bdb703b commit bc1533d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/components/VolunteerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import {
fixAssetPath,
} from '~utils';

const englishCollator = new Intl.Collator('en', { sensitivity: 'base' });

export interface VolunteerProps {
hideRoles?: boolean;
volunteer: Collabie;
Expand Down Expand Up @@ -54,7 +52,7 @@ function renderRolesList(roles: CollabieRoles[]) {
gap: '20px',
}}
>
{roles.sort(englishCollator.compare).map((role) => (
{roles.map((role) => (
<li
className="volunteer__roles-item"
style={{
Expand Down
2 changes: 1 addition & 1 deletion src/data/graphql-queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const CollabiesAndTeams = gql`
orderBy: firstName_ASC
) {
...collabieData
roles(where: { name_not: "Participant" }) {
roles(where: { name_not: "Participant" }, orderBy: name_ASC) {
name
}
}
Expand Down

0 comments on commit bc1533d

Please sign in to comment.