mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-03 07:10:26 +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(() => {
|
||||
return () => {
|
||||
livekitRoom?.disconnect();
|
||||
if (connState === ConnectionState.Connected) {
|
||||
livekitRoom?.disconnect();
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
@@ -381,7 +383,13 @@ export const InCallView: FC<InCallViewProps> = ({
|
||||
}
|
||||
|
||||
buttons.push(
|
||||
<HangupButton key="6" onPress={onLeave} data-testid="incall_leave" />,
|
||||
<HangupButton
|
||||
key="6"
|
||||
onPress={function (): void {
|
||||
onLeave();
|
||||
}}
|
||||
data-testid="incall_leave"
|
||||
/>,
|
||||
);
|
||||
footer = (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user