feat: Invited Link Displays Channel Content
This commit is contained in:
parent
220994eeaa
commit
7893512e2b
3 changed files with 20 additions and 2 deletions
|
@ -17,12 +17,24 @@ type Props = {
|
|||
channelIsMine: boolean,
|
||||
fetchClaims: (string, number) => void,
|
||||
channelIsBlackListed: boolean,
|
||||
defaultPageSize?: number,
|
||||
defaultInfiniteScroll?: Boolean,
|
||||
claim: ?Claim,
|
||||
isAuthenticated: boolean,
|
||||
};
|
||||
|
||||
function ChannelContent(props: Props) {
|
||||
const { uri, fetching, channelIsMine, channelIsBlocked, channelIsBlackListed, claim, isAuthenticated } = props;
|
||||
const {
|
||||
uri,
|
||||
fetching,
|
||||
channelIsMine,
|
||||
channelIsBlocked,
|
||||
channelIsBlackListed,
|
||||
claim,
|
||||
isAuthenticated,
|
||||
defaultPageSize = CS.PAGE_SIZE,
|
||||
defaultInfiniteScroll = true,
|
||||
} = props;
|
||||
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
|
||||
|
||||
return (
|
||||
|
@ -56,6 +68,8 @@ function ChannelContent(props: Props) {
|
|||
<ClaimListDiscover
|
||||
channelIds={[claim.claim_id]}
|
||||
defaultOrderBy={CS.ORDER_BY_NEW}
|
||||
pageSize={defaultPageSize}
|
||||
infiniteScroll={defaultInfiniteScroll}
|
||||
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
|
||||
/>
|
||||
) : (
|
||||
|
|
|
@ -53,6 +53,7 @@ type Props = {
|
|||
pageSize?: number,
|
||||
followedTags?: Array<Tag>,
|
||||
injectedItem: ?Node,
|
||||
infiniteScroll?: Boolean,
|
||||
};
|
||||
|
||||
function ClaimListDiscover(props: Props) {
|
||||
|
@ -87,6 +88,7 @@ function ClaimListDiscover(props: Props) {
|
|||
includeSupportAction,
|
||||
repostedClaimId,
|
||||
hideFilter,
|
||||
infiniteScroll = true,
|
||||
followedTags,
|
||||
injectedItem,
|
||||
} = props;
|
||||
|
@ -368,7 +370,7 @@ function ClaimListDiscover(props: Props) {
|
|||
}
|
||||
|
||||
function handleScrollBottom() {
|
||||
if (!loading) {
|
||||
if (!loading && infiniteScroll) {
|
||||
setPage(page + 1);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import Card from 'component/common/card';
|
|||
import { buildURI, parseURI } from 'lbry-redux';
|
||||
import { rewards as REWARDS, ERRORS } from 'lbryinc';
|
||||
import { formatLbryUrlForWeb } from 'util/url';
|
||||
import ChannelContent from 'component/channelContent';
|
||||
|
||||
type Props = {
|
||||
user: any,
|
||||
|
@ -142,6 +143,7 @@ function Invited(props: Props) {
|
|||
referrerIsChannel && (
|
||||
<div className="claim-preview--channel">
|
||||
<ClaimPreview key={refUri} uri={refUri} actions={''} type={'small'} />
|
||||
<ChannelContent uri={fullUri} defaultPageSize={5} defaultInfiniteScroll={false} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue