Hotfix livestream status (#292)

* Fix livestream status on upcoming livestream

* update fix
This commit is contained in:
Dan Peterson 2021-11-15 09:58:29 -06:00 committed by GitHub
parent 70d18eba59
commit e02bc6cc03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,10 @@ export default function LivestreamPage(props: Props) {
}, [livestreamChannelId, isLive]); }, [livestreamChannelId, isLive]);
React.useEffect(() => { React.useEffect(() => {
if (!hasLivestreamClaim || !livestreamChannelId) return; if (!hasLivestreamClaim || !livestreamChannelId) {
setIsLive(false);
return;
}
return watchLivestreamStatus(livestreamChannelId, (state) => setIsLive(state)); return watchLivestreamStatus(livestreamChannelId, (state) => setIsLive(state));
}, [livestreamChannelId, setIsLive, hasLivestreamClaim]); }, [livestreamChannelId, setIsLive, hasLivestreamClaim]);