This commit is contained in:
Half-Shot
2024-10-31 16:25:31 +00:00
parent ec9dec89bb
commit 21380c7791
3 changed files with 57 additions and 46 deletions

View File

@@ -84,7 +84,7 @@ export const ReactionsProvider = ({
const myReactionId = useMemo(
(): string | null =>
(myUserId && raisedHands[myUserId]?.reactionEventId) ?? null,
[raisedHands, room],
[raisedHands, myUserId],
);
// Reduce the data down for the consumers.
@@ -160,7 +160,14 @@ export const ReactionsProvider = ({
}
}
}
}, [room, memberships, addRaisedHand, removeRaisedHand]);
}, [
room,
memberships,
myUserId,
raisedHands,
addRaisedHand,
removeRaisedHand,
]);
// This effect handles any *live* reaction/redactions in the room.
useEffect(() => {