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';
|
2018-07-11 05:29:10 +02:00
|
|
|
|
|
|
|
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')} />.
|
2018-07-11 05:29:10 +02:00
|
|
|
</div>
|
|
|
|
)
|
|
|
|
);
|
|
|
|
};
|