// @flow import * as ICONS from 'constants/icons'; import React, { useEffect } from 'react'; import ClaimList from 'component/claimList'; import Page from 'component/page'; import Button from 'component/button'; import YoutubeTransferStatus from 'component/youtubeTransferStatus'; import Spinner from 'component/spinner'; import Card from 'component/common/card'; import * as PAGES from 'constants/pages'; type Props = { channels: Array, channelUrls: Array, fetchChannelListMine: () => void, fetchingChannels: boolean, youtubeChannels: ?Array, }; export default function ChannelsPage(props: Props) { const { channels, channelUrls, fetchChannelListMine, fetchingChannels, youtubeChannels } = props; const hasYoutubeChannels = youtubeChannels && Boolean(youtubeChannels.length); const hasPendingChannels = channels && channels.some(channel => channel.confirmations < 0); useEffect(() => { fetchChannelListMine(); }, [fetchChannelListMine, hasPendingChannels]); return (
{hasYoutubeChannels && } {channelUrls && Boolean(channelUrls.length) && (
{!(channelUrls && channelUrls.length) && ( {!fetchingChannels ? (

{__('No Channels Created Yet')}

) : (

{__('Checking for channels')}

)}
)}
); }