Skip to content

Commit

Permalink
Iterate handleSplitUsers so it always tries to add user to room with …
Browse files Browse the repository at this point in the history
…least number of users
  • Loading branch information
Daniel Fosco committed Dec 12, 2023
1 parent 34ef457 commit 4d6a282
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,11 @@ export const BreakoutManager: React.FC = () => {
usersInRooms.push(users.slice(i, i + roomSize));
}

// Sort rooms by number of participants in ascending order
const sortedRooms = [...rooms].sort((a, b) => a.participants.length - b.participants.length);

for (let i = 0; i < count; ++i) {
const room = rooms[i];
const room = sortedRooms[i];
const participants = usersInRooms[i];
for (const participant of participants) {
await service.addParticipant(room, participant);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@
align-items: center;
align-self: flex-start;
width: 100%;
}

& .starter-action-title {
font-size: 1.25em;
font-weight: 600;
line-height: 1.5em;
text-align: left;
color: var(--blue700);
margin: 0;
}
.starter-action .starter-action-title {
font-size: 1.25em;
font-weight: 600;
line-height: 1.5em;
text-align: left;
color: var(--blue700);
margin: 0;
}

&:hover {
background: var(--blue300);
cursor: pointer;
.starter-action:hover {
background: var(--blue300);
cursor: pointer;
}

& .starter-action-title {
color: var(--blue900);
}
.starter-action:hover .starter-action-title {
color: var(--blue900);
}

& .rounded-plus {
background-color: var(--blue900);
}
}
.starter-action:hover .rounded-plus {
background-color: var(--blue900);
}

.rounded-plus {
Expand Down

0 comments on commit 4d6a282

Please sign in to comment.