fix: show all available players in undecided when restoring
This commit is contained in:
parent
4252e737d7
commit
8f355c0cf3
@ -78,7 +78,13 @@ function ChemistryDnD({ user, players }: PlayerInfoProps) {
|
|||||||
async function handleGet() {
|
async function handleGet() {
|
||||||
const chemistry = (await apiAuth("chemistry", null, "GET")) as Chemistry;
|
const chemistry = (await apiAuth("chemistry", null, "GET")) as Chemistry;
|
||||||
setPlayersLeft(filterSort(otherPlayers, chemistry.hate));
|
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));
|
setPlayersRight(filterSort(otherPlayers, chemistry.love));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user