Only show "start at" on share page for videos/audio

Closes #4177
This commit is contained in:
Jeffrey Fisher 2020-05-14 21:14:50 -07:00 committed by Sean Yesmunt
parent 394fad5754
commit 9c70df72dc

View file

@ -42,6 +42,10 @@ function SocialShare(props: Props) {
const { canonical_url: canonicalUrl, permanent_url: permanentUrl, name, claim_id: claimId } = claim;
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 OPEN_URL = 'https://open.lbry.com/';
const lbryUrl: string = generateLbryContentUrl(canonicalUrl, permanentUrl);
@ -71,6 +75,7 @@ function SocialShare(props: Props) {
return (
<React.Fragment>
<CopyableText label={__('LBRY Link')} copyable={openDotLbryDotComUrl} />
{showStartAt && (
<div className="section__start-at">
<FormField
type="checkbox"
@ -87,6 +92,7 @@ function SocialShare(props: Props) {
onChange={event => setStartTime(event.target.value)}
/>
</div>
)}
<div className="section__actions">
<Button
className="share"