// @flow import * as React from 'react'; import { normalizeURI } from 'util/lbryURI'; import FilePrice from 'component/filePrice'; import ClaimInsufficientCredits from 'component/claimInsufficientCredits'; import FileSubtitle from 'component/fileSubtitle'; import ClaimAuthor from 'component/claimAuthor'; import Card from 'component/common/card'; import * as ICONS from 'constants/icons'; import * as PAGES from 'constants/pages'; import Icon from 'component/common/icon'; import I18nMessage from 'component/i18nMessage'; import Button from 'component/button'; import FileDescription from 'component/fileDescription'; import { ENABLE_MATURE } from 'config'; import { useIsMobile } from 'effects/use-screensize'; type Props = { uri: string, nsfw: boolean, isNsfwBlocked: boolean, livestream?: boolean, isLive?: boolean, // redux channelClaimId?: string, title?: string, subCount: number, doFetchSubCount: (claimId: string) => void, }; export default function FileTitleSection(props: Props) { const { uri, nsfw, isNsfwBlocked, livestream = false, isLive = false, subCount, channelClaimId, title, doFetchSubCount, } = props; const isMobile = useIsMobile(); React.useEffect(() => { if (channelClaimId) doFetchSubCount(channelClaimId); }, [channelClaimId, doFetchSubCount]); return ( {title} {nsfw && ( {__('Mature')} )} } titleActions={} body={ <> } actions={ isNsfwBlocked ? (

<> {ENABLE_MATURE ? __('Mature content blocked.') : __('Mature content is not supported.')}

{ENABLE_MATURE ? ( ), }} > Change this in your %content_settings%. ) : ( , }} > You can download the LBRY Desktop or Android app on %download_url% and enable mature content in Settings. )}
) : ( <> ) } /> ); }