diff --git a/frontend/frontend/src/pages/groupsPage/ChooseGroup.tsx b/frontend/frontend/src/pages/groupsPage/ChooseGroup.tsx index 1e848a98..0c44fba6 100644 --- a/frontend/frontend/src/pages/groupsPage/ChooseGroup.tsx +++ b/frontend/frontend/src/pages/groupsPage/ChooseGroup.tsx @@ -121,10 +121,14 @@ export function ChooseGroup() { } }) } - const groups = await instance.get( + const groups = await instance.get( '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 {