lbry-desktop/ui/component/hiddenNsfwClaims/view.jsx
2019-11-25 15:13:19 -05:00

23 lines
634 B
JavaScript

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