// @flow import React from 'react'; import UriIndicator from 'component/uriIndicator'; import DateTime from 'component/dateTime'; import Button from 'component/button'; import { parseURI } from 'lbry-redux'; type Props = { uri: string, claim: ?Claim, pending?: boolean, type: string, beginPublish: string => void, }; function ClaimPreviewSubtitle(props: Props) { const { pending, uri, claim, type, beginPublish } = props; const claimsInChannel = (claim && claim.meta.claims_in_channel) || 0; let isChannel; let name; try { ({ streamName: name, isChannel } = parseURI(uri)); } catch (e) {} return (
{claim ? ( {' '} {!pending && claim && (isChannel ? type !== 'inline' && `${claimsInChannel} ${__('publishes')}` : )} ) : (
{__('Publish something and claim this spot!')}
)}
); } export default ClaimPreviewSubtitle;