mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-08 20:09:19 +00:00
hehe... onLeave(error)...
(we had an error because onLeave gets called with the button) Signed-off-by: Timo K <toger5@hotmail.de>
This commit is contained in:
@@ -109,7 +109,9 @@ export const ActiveCall: FC<ActiveCallProps> = (props) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
return () => {
|
return () => {
|
||||||
livekitRoom?.disconnect();
|
if (connState === ConnectionState.Connected) {
|
||||||
|
livekitRoom?.disconnect();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
@@ -381,7 +383,13 @@ export const InCallView: FC<InCallViewProps> = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
buttons.push(
|
buttons.push(
|
||||||
<HangupButton key="6" onPress={onLeave} data-testid="incall_leave" />,
|
<HangupButton
|
||||||
|
key="6"
|
||||||
|
onPress={function (): void {
|
||||||
|
onLeave();
|
||||||
|
}}
|
||||||
|
data-testid="incall_leave"
|
||||||
|
/>,
|
||||||
);
|
);
|
||||||
footer = (
|
footer = (
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user