Skip to content

Commit

Permalink
Merge pull request #321 from SELab-2/last_last_bugs
Browse files Browse the repository at this point in the history
groepen gesorteerd in studentpagina
  • Loading branch information
Bendemeurichy authored May 23, 2024
2 parents 368a2f9 + a92499c commit 78c0dcb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions frontend/frontend/src/pages/groupsPage/ChooseGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,14 @@ export function ChooseGroup() {
}
})
}
const groups = await instance.get(
const groups = await instance.get<Group[]>(
'groepen/?project=' + assignmentId
)
setGroups(groups.data)
const sortedGroups = groups.data.sort((a: Group, b: Group) => {
return a.groep_id - b.groep_id
})

setGroups(sortedGroups)
} catch (err) {
console.error(err)
} finally {
Expand Down

0 comments on commit 78c0dcb

Please sign in to comment.