Skip to content

Commit

Permalink
Fix colleagues order
Browse files Browse the repository at this point in the history
  • Loading branch information
smrtrfszm authored and TwoDCube committed Sep 15, 2024
1 parent 6815fbc commit bdc79bf
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,25 @@ export function colleaguesReducer(state: ColleaguesState = initialState, action:
for (const colleague of action.payload) {
categories[colleague.category].push(colleague)
}

for (const category of categories) {
category.sort((a, b) => {
if (a.name === 'Szűcs Sándor') {
return -1
}

if (b.name === 'Szűcs Sándor') {
return 1
}

if (a.name > b.name) {
return 1
} else {
return -1
}
})
}

state = {
...state,
categories,
Expand Down

0 comments on commit bdc79bf

Please sign in to comment.