2018-07-11 05:29:10 +02:00
|
|
|
// @flow
|
|
|
|
import React from 'react';
|
2018-07-11 05:43:02 +02:00
|
|
|
import Button from 'component/button';
|
2019-12-13 23:32:20 +01:00
|
|
|
import I18nMessage from 'component/i18nMessage';
|
2018-07-11 05:29:10 +02:00
|
|
|
|
|
|
|
type Props = {
|
2019-11-25 21:13:19 +01:00
|
|
|
numberOfHiddenClaims: number,
|
2018-07-11 05:29:10 +02:00
|
|
|
obscureNsfw: boolean,
|
|
|
|
className: ?string,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default (props: Props) => {
|
2019-12-13 23:32:20 +01:00
|
|
|
const { numberOfHiddenClaims: number, obscureNsfw } = props;
|
2019-05-07 04:35:04 +02:00
|
|
|
|
2018-07-11 05:29:10 +02:00
|
|
|
return (
|
|
|
|
obscureNsfw &&
|
2019-12-13 23:32:20 +01:00
|
|
|
Boolean(number) && (
|
2019-09-27 20:56:15 +02:00
|
|
|
<div className="section--padded section__subtitle">
|
2019-12-13 23:32:20 +01:00
|
|
|
<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>
|
2018-07-11 05:29:10 +02:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
);
|
|
|
|
};
|