reverse livestream status check (#293)

This commit is contained in:
Dan Peterson 2021-11-15 10:52:00 -06:00 committed by GitHub
parent e02bc6cc03
commit 0c28f3c6f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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