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

24 lines
631 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) => {
const { numberOfNsfwClaims, obscureNsfw, className } = props;
return (
obscureNsfw &&
Boolean(numberOfNsfwClaims) && (
<div className={className || 'help'}>
{numberOfNsfwClaims} {numberOfNsfwClaims > 1 ? __('files') : __('file')}{' '}
2018-07-11 05:43:02 +02:00
{__('hidden due to your')}{' '}
<Button button="link" navigate="/settings" label={__('content viewing preferences')} />.
</div>
)
);
};