fix embedWrapper liveChannel fetch
This commit is contained in:
parent
d4cb51ff2a
commit
0934b2fb88
1 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,7 @@ import Card from 'component/common/card';
|
||||||
import { formatLbryUrlForWeb, formatLbryChannelName } from 'util/url';
|
import { formatLbryUrlForWeb, formatLbryChannelName } from 'util/url';
|
||||||
import { useHistory } from 'react-router';
|
import { useHistory } from 'react-router';
|
||||||
|
|
||||||
const LIVESTREAM_STATUS_CHECK_INTERVAL = 30000;
|
const LIVESTREAM_STATUS_CHECK_INTERVAL = 30 * 1000;
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
uri: string,
|
uri: string,
|
||||||
|
@ -121,7 +121,8 @@ const EmbedWrapperPage = (props: Props) => {
|
||||||
const intervalId = setInterval(() => doFetchChannelLiveStatus(channelClaimId), LIVESTREAM_STATUS_CHECK_INTERVAL);
|
const intervalId = setInterval(() => doFetchChannelLiveStatus(channelClaimId), LIVESTREAM_STATUS_CHECK_INTERVAL);
|
||||||
|
|
||||||
return () => clearInterval(intervalId);
|
return () => clearInterval(intervalId);
|
||||||
}, [activeLivestreams, channelClaim, doFetchChannelLiveStatus]);
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [channelClaim, doFetchChannelLiveStatus]);
|
||||||
|
|
||||||
if (isClaimBlackListed) {
|
if (isClaimBlackListed) {
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue