remove referral code from share (#7350)
* remove referral code from share * cleanup
This commit is contained in:
parent
f474c014f3
commit
514bc0a273
2 changed files with 3 additions and 20 deletions
|
@ -1,15 +1,12 @@
|
|||
import { connect } from 'react-redux';
|
||||
import { makeSelectClaimForUri, makeSelectTitleForUri } from 'redux/selectors/claims';
|
||||
import SocialShare from './view';
|
||||
import { selectUserInviteReferralCode, selectUser } from 'redux/selectors/user';
|
||||
import { makeSelectContentPositionForUri } from 'redux/selectors/content';
|
||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||
import * as SETTINGS from 'constants/settings';
|
||||
|
||||
const select = (state, props) => ({
|
||||
claim: makeSelectClaimForUri(props.uri)(state),
|
||||
referralCode: selectUserInviteReferralCode(state),
|
||||
user: selectUser(state),
|
||||
title: makeSelectTitleForUri(props.uri)(state),
|
||||
position: makeSelectContentPositionForUri(props.uri)(state),
|
||||
customShareUrlEnabled: makeSelectClientSetting(SETTINGS.CUSTOM_SHARE_URL_ENABLED)(state),
|
||||
|
|
|
@ -22,8 +22,6 @@ type Props = {
|
|||
claim: StreamClaim,
|
||||
title: ?string,
|
||||
webShareable: boolean,
|
||||
referralCode: string,
|
||||
user: any,
|
||||
position: number,
|
||||
collectionId?: number,
|
||||
customShareUrlEnabled: boolean,
|
||||
|
@ -31,17 +29,7 @@ type Props = {
|
|||
};
|
||||
|
||||
function SocialShare(props: Props) {
|
||||
const {
|
||||
claim,
|
||||
title,
|
||||
referralCode,
|
||||
user,
|
||||
webShareable,
|
||||
position,
|
||||
collectionId,
|
||||
customShareUrlEnabled,
|
||||
customShareUrl,
|
||||
} = props;
|
||||
const { claim, title, webShareable, position, collectionId, customShareUrlEnabled, customShareUrl } = props;
|
||||
const [showEmbed, setShowEmbed] = React.useState(false);
|
||||
const [includeCollectionId, setIncludeCollectionId] = React.useState(Boolean(collectionId)); // unless it *is* a collection?
|
||||
const [showClaimLinks, setShowClaimLinks] = React.useState(false);
|
||||
|
@ -62,7 +50,6 @@ function SocialShare(props: Props) {
|
|||
const isVideo = isStream && claim.value.stream_type === 'video';
|
||||
const isAudio = isStream && claim.value.stream_type === 'audio';
|
||||
const showStartAt = isVideo || isAudio;
|
||||
const rewardsApproved = user && user.is_reward_approved;
|
||||
const lbryUrl: string = generateLbryContentUrl(canonicalUrl, permanentUrl);
|
||||
const lbryWebUrl: string = generateLbryWebUrl(lbryUrl);
|
||||
const includedCollectionId = collectionId && includeCollectionId ? collectionId : null;
|
||||
|
@ -76,8 +63,8 @@ function SocialShare(props: Props) {
|
|||
const shareUrl: string = generateShareUrl(
|
||||
shareDomain,
|
||||
lbryUrl,
|
||||
referralCode,
|
||||
rewardsApproved,
|
||||
null,
|
||||
null,
|
||||
includeStartTime,
|
||||
startTimeSeconds,
|
||||
includedCollectionId
|
||||
|
@ -214,7 +201,6 @@ function SocialShare(props: Props) {
|
|||
claim={claim}
|
||||
includeStartTime={includeStartTime}
|
||||
startTime={startTimeSeconds}
|
||||
referralCode={referralCode}
|
||||
/>
|
||||
)}
|
||||
{showClaimLinks && (
|
||||
|
|
Loading…
Reference in a new issue