// @flow import * as MODALS from 'constants/modal_types'; 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, openModal: string => void, }; export default function ChannelsPage(props: Props) { const { channels, channelUrls, fetchChannelListMine, fetchingChannels, youtubeChannels, openModal } = 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')}

)}
)}
); }