From be3105db342eec02f66a71370751aa902406c560 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 28 Feb 2020 09:40:18 -0500 Subject: [PATCH] move channel page to ClaimListDiscover --- ui/component/channelContent/view.jsx | 54 ++++++---------------------- 1 file changed, 11 insertions(+), 43 deletions(-) diff --git a/ui/component/channelContent/view.jsx b/ui/component/channelContent/view.jsx index 28f6672ca..2b6748966 100644 --- a/ui/component/channelContent/view.jsx +++ b/ui/component/channelContent/view.jsx @@ -1,11 +1,10 @@ // @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'; import Button from 'component/button'; +import ClaimListDiscover from 'component/claimListDiscover'; +import { TYPE_NEW } from 'component/claimListDiscover/view'; type Props = { uri: string, @@ -21,37 +20,13 @@ type Props = { }; function ChannelContent(props: Props) { - const { - uri, - fetching, - pageOfClaimsInChannel, - totalPages, - channelIsMine, - channelIsBlocked, - fetchClaims, - channelIsBlackListed, - claim, - } = props; - const hasContent = Boolean(pageOfClaimsInChannel && pageOfClaimsInChannel.length); + const { uri, fetching, channelIsMine, channelIsBlocked, channelIsBlackListed, claim } = props; const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0; + return ( - {fetching && !hasContent && ( -
- -
- )} - - {!fetching && !claimsInChannel && !channelIsBlocked && !channelIsBlackListed && ( -
-

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

-
- )} - - {!fetching && !hasContent && Boolean(claimsInChannel) && !channelIsBlocked && !channelIsBlackListed && ( -
- -
+ {!fetching && Boolean(claimsInChannel) && !channelIsBlocked && !channelIsBlackListed && ( + )} {!fetching && channelIsBlackListed && ( @@ -73,19 +48,12 @@ function ChannelContent(props: Props) { )} - {!channelIsMine && hasContent && } + {!channelIsMine && claimsInChannel > 0 && } - {hasContent && !channelIsBlocked && !channelIsBlackListed && ( - claim && claim.canonical_url)} /> - )} - - {!channelIsBlocked && !channelIsBlackListed && ( - fetchClaims(uri, page)} - totalPages={totalPages} - loading={fetching && !hasContent} - /> + {claim && claimsInChannel > 0 ? ( + + ) : ( +
This channel hasn't published anything yet
)}
);