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

24 lines
634 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 = {
2019-11-25 21:13:19 +01:00
numberOfHiddenClaims: number,
obscureNsfw: boolean,
className: ?string,
};
export default (props: Props) => {
2019-11-25 21:13:19 +01:00
const { numberOfHiddenClaims, obscureNsfw } = props;
2019-05-07 04:35:04 +02:00
return (
obscureNsfw &&
2019-11-25 21:13:19 +01:00
Boolean(numberOfHiddenClaims) && (
2019-09-27 20:56:15 +02:00
<div className="section--padded section__subtitle">
2019-11-25 21:13:19 +01:00
{numberOfHiddenClaims} {numberOfHiddenClaims > 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>
)
);
};