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

35 lines
928 B
React
Raw Permalink Normal View History

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