this has to fix the linting issue

This commit is contained in:
DispatchCommit 2021-03-22 15:48:56 -07:00
parent a4a714a561
commit ec996d8bf7

View file

@ -15,20 +15,14 @@ type Props = {
}; };
export default function LivestreamPage(props: Props) { export default function LivestreamPage(props: Props) {
const { const { uri, claim, doSetPlayingUri, isAuthenticated, doUserSetReferrer, channelClaim } = props;
uri,
claim,
doSetPlayingUri,
isAuthenticated,
doUserSetReferrer,
channelClaim,
} = props;
const [activeViewers, setActiveViewers] = React.useState(0); const [activeViewers, setActiveViewers] = React.useState(0);
const [isLive, setIsLive] = React.useState(false); const [isLive, setIsLive] = React.useState(false);
const livestreamChannelId = channelClaim && channelClaim.signing_channel && channelClaim.signing_channel.claim_id; const livestreamChannelId = channelClaim && channelClaim.signing_channel && channelClaim.signing_channel.claim_id;
React.useEffect(() => { React.useEffect(() => {
function checkIsLive() { function checkIsLive() {
// $FlowFixMe Bitwave's API can handle garbage
fetch(`${BITWAVE_API}/${livestreamChannelId}`) fetch(`${BITWAVE_API}/${livestreamChannelId}`)
.then((res) => res.json()) .then((res) => res.json())
.then((res) => { .then((res) => {
@ -87,11 +81,7 @@ export default function LivestreamPage(props: Props) {
return ( return (
<Page className="file-page" filePage livestream> <Page className="file-page" filePage livestream>
<LivestreamLayout <LivestreamLayout uri={uri} activeViewers={activeViewers} isLive={isLive} />
uri={uri}
activeViewers={activeViewers}
isLive={isLive}
/>
</Page> </Page>
); );
} }