fix: show all available players in undecided when restoring

This commit is contained in:
2025-03-16 21:50:52 +01:00
parent 4252e737d7
commit 8f355c0cf3

View File

@@ -78,7 +78,13 @@ function ChemistryDnD({ user, players }: PlayerInfoProps) {
async function handleGet() {
const chemistry = (await apiAuth("chemistry", null, "GET")) as Chemistry;
setPlayersLeft(filterSort(otherPlayers, chemistry.hate));
setPlayersMiddle(filterSort(otherPlayers, chemistry.undecided));
setPlayersMiddle(
otherPlayers.filter(
(player) =>
!chemistry.hate.includes(player.id) &&
!chemistry.love.includes(player.id)
)
);
setPlayersRight(filterSort(otherPlayers, chemistry.love));
}