Disable answer button on click
GitLab: #190
Change-Id: I91f54ae923c8ee5ac27d02b58ad6db5c536e287d
diff --git a/client/src/components/CallButtons.tsx b/client/src/components/CallButtons.tsx
index d0c2c5e..75f7676 100644
--- a/client/src/components/CallButtons.tsx
+++ b/client/src/components/CallButtons.tsx
@@ -268,10 +268,11 @@
};
export const CallingAnswerAudioButton = (props: IconButtonProps) => {
- const { acceptCall } = useContext(CallContext);
+ const { acceptCall, isAnswerButtonDisabled } = useContext(CallContext);
return (
<ColoredCallButton
+ disabled={isAnswerButtonDisabled}
aria-label="answer call audio"
onClick={() => {
acceptCall(false);
@@ -284,10 +285,10 @@
};
export const CallingAnswerVideoButton = (props: IconButtonProps) => {
- const { acceptCall } = useContext(CallContext);
-
+ const { acceptCall, isAnswerButtonDisabled } = useContext(CallContext);
return (
<ColoredCallButton
+ disabled={isAnswerButtonDisabled}
aria-label="answer call video"
onClick={() => {
acceptCall(true);