Add feature to release hand raised when the tile indicator is clicked. (#2721)

* Refactor to add support for lowering hand on indicator click.

* Cleanup and lint.

* fix icon being a little off
This commit is contained in:
Will Hunt
2024-11-06 11:00:19 +00:00
committed by GitHub
parent 110914a4d6
commit bc0ab92394
8 changed files with 106 additions and 49 deletions

View File

@@ -45,7 +45,7 @@ const membership: Record<string, string> = {
};
const TestComponent: FC = () => {
const { raisedHands, myReactionId } = useReactions();
const { raisedHands } = useReactions();
return (
<div>
<ul>
@@ -56,7 +56,6 @@ const TestComponent: FC = () => {
</li>
))}
</ul>
<p>{myReactionId ? "Local reaction" : "No local reaction"}</p>
</div>
);
};
@@ -172,15 +171,6 @@ describe("useReactions", () => {
);
expect(queryByRole("list")?.children).to.have.lengthOf(0);
});
test("handles own raised hand", async () => {
const room = new MockRoom();
const rtcSession = new MockRTCSession(room);
const { queryByText } = render(
<TestComponentWrapper rtcSession={rtcSession} />,
);
await act(() => room.testSendReaction(memberEventAlice));
expect(queryByText("Local reaction")).toBeTruthy();
});
test("handles incoming raised hand", async () => {
const room = new MockRoom();
const rtcSession = new MockRTCSession(room);