channel follow first run on master
This commit is contained in:
parent
ed0387d94a
commit
038431f95c
1 changed files with 14 additions and 13 deletions
|
@ -6,12 +6,11 @@ import Nag from 'component/common/nag';
|
||||||
import { parseURI } from 'lbry-redux';
|
import { parseURI } from 'lbry-redux';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import Card from 'component/common/card';
|
import Card from 'component/common/card';
|
||||||
import { AUTO_FOLLOW_CHANNELS, CUSTOM_HOMEPAGE } from 'config';
|
import { AUTO_FOLLOW_CHANNELS, CUSTOM_HOMEPAGE, SIMPLE_SITE, SITE_NAME } from 'config';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
subscribedChannels: Array<Subscription>,
|
subscribedChannels: Array<Subscription>,
|
||||||
onContinue: () => void,
|
onContinue: () => void,
|
||||||
onBack: () => void,
|
|
||||||
channelSubscribe: (sub: Subscription) => void,
|
channelSubscribe: (sub: Subscription) => void,
|
||||||
homepageData: any,
|
homepageData: any,
|
||||||
prefsReady: boolean,
|
prefsReady: boolean,
|
||||||
|
@ -22,7 +21,7 @@ const channelsToSubscribe = AUTO_FOLLOW_CHANNELS.trim()
|
||||||
.filter((x) => x !== '');
|
.filter((x) => x !== '');
|
||||||
|
|
||||||
function UserChannelFollowIntro(props: Props) {
|
function UserChannelFollowIntro(props: Props) {
|
||||||
const { subscribedChannels, channelSubscribe, onContinue, onBack, homepageData, prefsReady } = props;
|
const { subscribedChannels, channelSubscribe, onContinue, homepageData, prefsReady } = props;
|
||||||
const { PRIMARY_CONTENT } = homepageData;
|
const { PRIMARY_CONTENT } = homepageData;
|
||||||
let channelIds;
|
let channelIds;
|
||||||
if (PRIMARY_CONTENT && CUSTOM_HOMEPAGE) {
|
if (PRIMARY_CONTENT && CUSTOM_HOMEPAGE) {
|
||||||
|
@ -49,25 +48,27 @@ function UserChannelFollowIntro(props: Props) {
|
||||||
<Card
|
<Card
|
||||||
title={__('Find channels to follow')}
|
title={__('Find channels to follow')}
|
||||||
subtitle={__(
|
subtitle={__(
|
||||||
'LBRY works better if you find and follow a couple creators you like. You can also block channels you never want to see.'
|
'%SITE_NAME% works better if you find and follow a couple creators you like. You can also block channels you never want to see.',
|
||||||
|
{ SITE_NAME }
|
||||||
)}
|
)}
|
||||||
actions={
|
actions={
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<div className="section__actions--between">
|
|
||||||
<Button button="secondary" onClick={onBack} label={__('Back')} />
|
|
||||||
<Button
|
|
||||||
button={subscribedChannels.length < 1 ? 'alt' : 'primary'}
|
|
||||||
onClick={onContinue}
|
|
||||||
label={subscribedChannels.length < 1 ? __('Skip') : __('Continue')}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="section__body">
|
<div className="section__body">
|
||||||
<ClaimListDiscover
|
<ClaimListDiscover
|
||||||
defaultOrderBy={CS.ORDER_BY_TOP}
|
hideFilters={SIMPLE_SITE}
|
||||||
|
meta={
|
||||||
|
<Button
|
||||||
|
button={subscribedChannels.length < 1 ? 'alt' : 'primary'}
|
||||||
|
onClick={onContinue}
|
||||||
|
label={subscribedChannels.length < 1 ? __('Skip') : __('Continue')}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
defaultOrderBy={SIMPLE_SITE ? CS.ORDER_BY_TOP : CS.ORDER_BY_TRENDING}
|
||||||
defaultFreshness={CS.FRESH_ALL}
|
defaultFreshness={CS.FRESH_ALL}
|
||||||
claimType="channel"
|
claimType="channel"
|
||||||
claimIds={CUSTOM_HOMEPAGE && channelIds ? channelIds : undefined}
|
claimIds={CUSTOM_HOMEPAGE && channelIds ? channelIds : undefined}
|
||||||
defaultTags={followingCount > 3 ? CS.TAGS_FOLLOWED : undefined}
|
defaultTags={followingCount > 3 ? CS.TAGS_FOLLOWED : undefined}
|
||||||
|
maxPages={SIMPLE_SITE ? 3 : undefined}
|
||||||
/>
|
/>
|
||||||
{followingCount > 0 && (
|
{followingCount > 0 && (
|
||||||
<Nag
|
<Nag
|
||||||
|
|
Loading…
Reference in a new issue