Merge pull request #1196 from vector-im/SimonBrandner/fix/useEffect
This commit is contained in:
commit
4c62759a6f
1 changed files with 1 additions and 8 deletions
|
@ -219,14 +219,7 @@ export function GroupCallView({
|
||||||
undefined
|
undefined
|
||||||
);
|
);
|
||||||
|
|
||||||
const [livekitServiceURL, setLivekitServiceURL] = useState<
|
const livekitServiceURL = groupCall.foci[0]?.livekitServiceUrl;
|
||||||
string | undefined
|
|
||||||
>(groupCall.foci[0]?.livekitServiceUrl);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
setLivekitServiceURL(groupCall.foci[0]?.livekitServiceUrl);
|
|
||||||
}, [setLivekitServiceURL, groupCall]);
|
|
||||||
|
|
||||||
if (!livekitServiceURL) {
|
if (!livekitServiceURL) {
|
||||||
return <ErrorView error={new Error("No livekit_service_url defined")} />;
|
return <ErrorView error={new Error("No livekit_service_url defined")} />;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue