872259b73a
* am I done? * post diff * unused selector cleanup * missed commit * mess with button styles * fix flow Co-authored-by: Jeremy Kauffman <jeremy@lbry.io> Co-authored-by: Sean Yesmunt <sean@lbry.io>
46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
// @flow
|
|
import * as React from 'react';
|
|
import { normalizeURI } from 'lbry-redux';
|
|
import FilePrice from 'component/filePrice';
|
|
import ClaimInsufficientCredits from 'component/claimInsufficientCredits';
|
|
import FileSubtitle from 'component/fileSubtitle';
|
|
import FileAuthor from 'component/fileAuthor';
|
|
import FileActions from 'component/fileActions';
|
|
import Card from 'component/common/card';
|
|
|
|
type Props = {
|
|
uri: string,
|
|
title: string,
|
|
nsfw: boolean,
|
|
};
|
|
|
|
function FileTitle(props: Props) {
|
|
const { title, uri, nsfw } = props;
|
|
|
|
return (
|
|
<Card
|
|
isPageTitle
|
|
title={
|
|
<React.Fragment>
|
|
{title}
|
|
<FilePrice badge uri={normalizeURI(uri)} />
|
|
{nsfw && (
|
|
<span className="media__title-badge">
|
|
<span className="badge badge--tag-mature">{__('Mature')}</span>
|
|
</span>
|
|
)}
|
|
</React.Fragment>
|
|
}
|
|
body={
|
|
<React.Fragment>
|
|
<ClaimInsufficientCredits uri={uri} />
|
|
<FileSubtitle uri={uri} />
|
|
<FileAuthor uri={uri} />
|
|
</React.Fragment>
|
|
}
|
|
actions={<FileActions uri={uri} />}
|
|
/>
|
|
);
|
|
}
|
|
|
|
export default FileTitle;
|