lbry-desktop/ui/component/hiddenNsfwClaims/view.jsx

24 lines
624 B
React
Raw Normal View History

// @flow
import React from 'react';
2018-07-11 05:43:02 +02:00
import Button from 'component/button';
type Props = {
numberOfNsfwClaims: number,
obscureNsfw: boolean,
className: ?string,
};
export default (props: Props) => {
2019-09-27 20:56:15 +02:00
const { numberOfNsfwClaims, obscureNsfw } = props;
2019-05-07 04:35:04 +02:00
return (
obscureNsfw &&
Boolean(numberOfNsfwClaims) && (
2019-09-27 20:56:15 +02:00
<div className="section--padded section__subtitle">
2019-05-07 04:35:04 +02:00
{numberOfNsfwClaims} {numberOfNsfwClaims > 1 ? __('files') : __('file')} {__('hidden due to your')}{' '}
2019-03-28 17:53:13 +01:00
<Button button="link" navigate="/$/settings" label={__('content viewing preferences')} />.
</div>
)
);
};