Add toggleable chat drawer in call
During a call, the chat button is enabled and lets the user open the
chat drawer.
GitLab: #177
Change-Id: I7a2ae09fca5af904c3280bc948a2d36135c1c63d
diff --git a/client/src/components/CallButtons.tsx b/client/src/components/CallButtons.tsx
index 7ccdd91..b127a77 100644
--- a/client/src/components/CallButtons.tsx
+++ b/client/src/components/CallButtons.tsx
@@ -84,7 +84,17 @@
});
export const CallingChatButton = (props: ExpandableButtonProps) => {
- return <CallButton aria-label="chat" Icon={ChatBubbleIcon} {...props} />;
+ const { setIsChatShown } = useContext(CallContext);
+ return (
+ <CallButton
+ aria-label="chat"
+ Icon={ChatBubbleIcon}
+ onClick={() => {
+ setIsChatShown((v) => !v);
+ }}
+ {...props}
+ />
+ );
};
export const CallingEndButton = (props: ExpandableButtonProps) => {