mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-27 07:23:31 +00:00
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,
|
channelIsMine: boolean,
|
||||||
fetchClaims: (string, number) => void,
|
fetchClaims: (string, number) => void,
|
||||||
channelIsBlackListed: boolean,
|
channelIsBlackListed: boolean,
|
||||||
|
defaultPageSize?: number,
|
||||||
|
defaultInfiniteScroll?: Boolean,
|
||||||
claim: ?Claim,
|
claim: ?Claim,
|
||||||
isAuthenticated: boolean,
|
isAuthenticated: boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
function ChannelContent(props: Props) {
|
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;
|
const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -56,6 +68,8 @@ function ChannelContent(props: Props) {
|
||||||
<ClaimListDiscover
|
<ClaimListDiscover
|
||||||
channelIds={[claim.claim_id]}
|
channelIds={[claim.claim_id]}
|
||||||
defaultOrderBy={CS.ORDER_BY_NEW}
|
defaultOrderBy={CS.ORDER_BY_NEW}
|
||||||
|
pageSize={defaultPageSize}
|
||||||
|
infiniteScroll={defaultInfiniteScroll}
|
||||||
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
|
injectedItem={!isAuthenticated && IS_WEB && <Ads type="video" />}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -53,6 +53,7 @@ type Props = {
|
||||||
pageSize?: number,
|
pageSize?: number,
|
||||||
followedTags?: Array<Tag>,
|
followedTags?: Array<Tag>,
|
||||||
injectedItem: ?Node,
|
injectedItem: ?Node,
|
||||||
|
infiniteScroll?: Boolean,
|
||||||
};
|
};
|
||||||
|
|
||||||
function ClaimListDiscover(props: Props) {
|
function ClaimListDiscover(props: Props) {
|
||||||
|
@ -87,6 +88,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
includeSupportAction,
|
includeSupportAction,
|
||||||
repostedClaimId,
|
repostedClaimId,
|
||||||
hideFilter,
|
hideFilter,
|
||||||
|
infiniteScroll = true,
|
||||||
followedTags,
|
followedTags,
|
||||||
injectedItem,
|
injectedItem,
|
||||||
} = props;
|
} = props;
|
||||||
|
@ -368,7 +370,7 @@ function ClaimListDiscover(props: Props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleScrollBottom() {
|
function handleScrollBottom() {
|
||||||
if (!loading) {
|
if (!loading && infiniteScroll) {
|
||||||
setPage(page + 1);
|
setPage(page + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import Card from 'component/common/card';
|
||||||
import { buildURI, parseURI } from 'lbry-redux';
|
import { buildURI, parseURI } from 'lbry-redux';
|
||||||
import { rewards as REWARDS, ERRORS } from 'lbryinc';
|
import { rewards as REWARDS, ERRORS } from 'lbryinc';
|
||||||
import { formatLbryUrlForWeb } from 'util/url';
|
import { formatLbryUrlForWeb } from 'util/url';
|
||||||
|
import ChannelContent from 'component/channelContent';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
user: any,
|
user: any,
|
||||||
|
@ -142,6 +143,7 @@ function Invited(props: Props) {
|
||||||
referrerIsChannel && (
|
referrerIsChannel && (
|
||||||
<div className="claim-preview--channel">
|
<div className="claim-preview--channel">
|
||||||
<ClaimPreview key={refUri} uri={refUri} actions={''} type={'small'} />
|
<ClaimPreview key={refUri} uri={refUri} actions={''} type={'small'} />
|
||||||
|
<ChannelContent uri={fullUri} defaultPageSize={5} defaultInfiniteScroll={false} />
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue