Merge pull request #1196 from vector-im/SimonBrandner/fix/useEffect

This commit is contained in:
Šimon Brandner 2023-07-06 12:15:56 +02:00 committed by GitHub
commit 4c62759a6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,14 +219,7 @@ export function GroupCallView({
undefined
);
const [livekitServiceURL, setLivekitServiceURL] = useState<
string | undefined
>(groupCall.foci[0]?.livekitServiceUrl);
useEffect(() => {
setLivekitServiceURL(groupCall.foci[0]?.livekitServiceUrl);
}, [setLivekitServiceURL, groupCall]);
const livekitServiceURL = groupCall.foci[0]?.livekitServiceUrl;
if (!livekitServiceURL) {
return <ErrorView error={new Error("No livekit_service_url defined")} />;
}