// @flow import React, { Fragment } from 'react'; import FileList from 'component/fileList'; 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, location: UrlLocation, }; 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 && } fetchClaims(uri, page)} totalPages={totalPages} loading={fetching && !hasContent} />
); } export default withRouter(ChannelContent);