parent
394fad5754
commit
9c70df72dc
1 changed files with 22 additions and 16 deletions
|
@ -42,6 +42,10 @@ function SocialShare(props: Props) {
|
||||||
|
|
||||||
const { canonical_url: canonicalUrl, permanent_url: permanentUrl, name, claim_id: claimId } = claim;
|
const { canonical_url: canonicalUrl, permanent_url: permanentUrl, name, claim_id: claimId } = claim;
|
||||||
const isChannel = claim.value_type === 'channel';
|
const isChannel = claim.value_type === 'channel';
|
||||||
|
const isStream = claim.value_type === 'stream';
|
||||||
|
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 rewardsApproved = user && user.is_reward_approved;
|
||||||
const OPEN_URL = 'https://open.lbry.com/';
|
const OPEN_URL = 'https://open.lbry.com/';
|
||||||
const lbryUrl: string = generateLbryContentUrl(canonicalUrl, permanentUrl);
|
const lbryUrl: string = generateLbryContentUrl(canonicalUrl, permanentUrl);
|
||||||
|
@ -71,6 +75,7 @@ function SocialShare(props: Props) {
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<CopyableText label={__('LBRY Link')} copyable={openDotLbryDotComUrl} />
|
<CopyableText label={__('LBRY Link')} copyable={openDotLbryDotComUrl} />
|
||||||
|
{showStartAt && (
|
||||||
<div className="section__start-at">
|
<div className="section__start-at">
|
||||||
<FormField
|
<FormField
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
@ -87,6 +92,7 @@ function SocialShare(props: Props) {
|
||||||
onChange={event => setStartTime(event.target.value)}
|
onChange={event => setStartTime(event.target.value)}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
<div className="section__actions">
|
<div className="section__actions">
|
||||||
<Button
|
<Button
|
||||||
className="share"
|
className="share"
|
||||||
|
|
Loading…
Reference in a new issue