// @flow import React, { Fragment } from 'react'; import ClaimList from 'component/claimList'; import HiddenNsfwClaims from 'component/hiddenNsfwClaims'; import { withRouter } from 'react-router-dom'; import Paginate from 'component/common/paginate'; import Spinner from 'component/spinner'; type Props = { uri: string, totalPages: number, fetching: boolean, params: { page: number }, claimsInChannel: Array, channelIsMine: boolean, fetchClaims: (string, number) => void, }; function ChannelContent(props: Props) { const { uri, fetching, claimsInChannel, totalPages, channelIsMine, fetchClaims } = props; const hasContent = Boolean(claimsInChannel && claimsInChannel.length); return ( {fetching && !hasContent && (
)} {!fetching && !hasContent && (

{__("This channel hasn't uploaded anything.")}

)} {!channelIsMine && } {hasContent && claim.permanent_url)} />} fetchClaims(uri, page)} totalPages={totalPages} loading={fetching && !hasContent} />
); } export default withRouter(ChannelContent);