mirror of
https://github.com/vector-im/element-call.git
synced 2026-09-28 22:45:49 +00:00
Tidy up useEffect
This commit is contained in:
@@ -95,7 +95,6 @@ export const ReactionsProvider = ({
|
|||||||
return allEvents.length > 0 ? allEvents[0] : undefined;
|
return allEvents.length > 0 ? allEvents[0] : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
const fetchReactions = (): void => {
|
|
||||||
for (const m of memberships) {
|
for (const m of memberships) {
|
||||||
if (!m.sender || !m.eventId) {
|
if (!m.sender || !m.eventId) {
|
||||||
continue;
|
continue;
|
||||||
@@ -115,10 +114,9 @@ export const ReactionsProvider = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
// Deliberately ignoring addRaisedHand which was causing looping.
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
void fetchReactions();
|
}, [room, memberships]);
|
||||||
}, [room, addRaisedHand, memberships]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleReactionEvent = (event: MatrixEvent): void => {
|
const handleReactionEvent = (event: MatrixEvent): void => {
|
||||||
|
|||||||
Reference in New Issue
Block a user