lbry-desktop/ui/page/channelsFollowing/view.jsx
zeppi fe86010be5 More master reconciliation
rewards page recon

router recon

uEmailVerify recon

uPVerify recon

rm style

app/view recon

channel page recon

chanFol recon

syncPassword recon

fileDesc recon

web/redirect recon

wip

page/view recon
2021-04-27 23:05:38 -04:00

52 lines
1.5 KiB
JavaScript

// @flow
import * as PAGES from 'constants/pages';
import * as ICONS from 'constants/icons';
import * as CS from 'constants/claim_search';
import { SIMPLE_SITE } from 'config';
import React from 'react';
import ChannelsFollowingDiscoverPage from 'page/channelsFollowingDiscover';
import ClaimListDiscover from 'component/claimListDiscover';
import Page from 'component/page';
import Button from 'component/button';
import Icon from 'component/common/icon';
type Props = {
subscribedChannels: Array<Subscription>,
tileLayout: boolean,
};
function ChannelsFollowingPage(props: Props) {
const { subscribedChannels, tileLayout } = props;
const hasSubsribedChannels = subscribedChannels.length > 0;
return !hasSubsribedChannels ? (
<ChannelsFollowingDiscoverPage />
) : (
<Page noFooter fullWidthPage={tileLayout}>
<ClaimListDiscover
hideAdvancedFilter={SIMPLE_SITE}
streamType={SIMPLE_SITE ? CS.CONTENT_ALL : undefined}
tileLayout={tileLayout}
headerLabel={
<span>
<Icon icon={ICONS.SUBSCRIBE} size={10} />
{__('Following')}
</span>
}
defaultOrderBy={CS.ORDER_BY_NEW}
channelIds={subscribedChannels.map((sub) => sub.uri.split('#')[1])}
meta={
<Button
icon={ICONS.SEARCH}
button="secondary"
label={__('Discover Channels')}
navigate={`/$/${PAGES.CHANNELS_FOLLOWING_DISCOVER}`}
/>
}
/>
</Page>
);
}
export default ChannelsFollowingPage;