lbry-desktop/ui/component/hiddenNsfwClaims/view.jsx
2019-11-11 13:27:29 -05:00

23 lines
624 B
JavaScript

// @flow
import React from 'react';
import Button from 'component/button';
type Props = {
numberOfNsfwClaims: number,
obscureNsfw: boolean,
className: ?string,
};
export default (props: Props) => {
const { numberOfNsfwClaims, obscureNsfw } = props;
return (
obscureNsfw &&
Boolean(numberOfNsfwClaims) && (
<div className="section--padded section__subtitle">
{numberOfNsfwClaims} {numberOfNsfwClaims > 1 ? __('files') : __('file')} {__('hidden due to your')}{' '}
<Button button="link" navigate="/$/settings" label={__('content viewing preferences')} />.
</div>
)
);
};