Skip to content

Commit

Permalink
groepen gesorteerd in studentpagina
Browse files Browse the repository at this point in the history
  • Loading branch information
Bendemeurichy committed May 23, 2024
1 parent 1a9e80e commit a92499c
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 a92499c

Please sign in to comment.