// @flow import * as PAGES from 'constants/pages'; import * as ICONS from 'constants/icons'; import * as CS from 'constants/claim_search'; import { SIMPLE_SITE } from 'config'; import React from 'react'; import ChannelsFollowingDiscoverPage from 'page/channelsFollowingDiscover'; import LivestreamSection from 'page/discover/livestreamSection'; import ClaimListDiscover from 'component/claimListDiscover'; import Page from 'component/page'; import Button from 'component/button'; import Icon from 'component/common/icon'; import { splitBySeparator } from 'util/lbryURI'; import { getLivestreamUris } from 'util/livestream'; import ScheduledStreams from 'component/scheduledStreams'; type Props = { subscribedChannels: Array, tileLayout: boolean, activeLivestreams: ?LivestreamInfo, doFetchActiveLivestreams: () => void, fetchingActiveLivestreams: boolean, hideScheduledLivestreams: boolean, }; function ChannelsFollowingPage(props: Props) { const { subscribedChannels, tileLayout, activeLivestreams, doFetchActiveLivestreams, fetchingActiveLivestreams, hideScheduledLivestreams, } = props; const hasSubscribedChannels = subscribedChannels.length > 0; const channelIds = subscribedChannels.map((sub) => splitBySeparator(sub.uri)[1]); React.useEffect(() => { doFetchActiveLivestreams(); }, []); return !hasSubscribedChannels ? ( ) : ( {!fetchingActiveLivestreams && ( <> {!hideScheduledLivestreams && ( )} {__('Following')} } defaultOrderBy={CS.ORDER_BY_NEW} channelIds={channelIds} meta={ <>