import classNames from 'clsx'; import React, { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useSoapboxConfig } from 'soapbox/hooks'; import { Button, HStack, Text } from '../ui'; const messages = defineMessages({ hide: { id: 'moderation_overlay.hide', defaultMessage: 'Hide' }, title: { id: 'moderation_overlay.title', defaultMessage: 'Content Under Review' }, subtitle: { id: 'moderation_overlay.subtitle', defaultMessage: 'This Post has been sent to Moderation for review and is only visible to you. If you believe this is an error please contact Support.' }, contact: { id: 'moderation_overlay.contact', defaultMessage: 'Contact' }, show: { id: 'moderation_overlay.show', defaultMessage: 'Show Content' }, }); const ModerationOverlay = () => { const intl = useIntl(); const { links } = useSoapboxConfig(); const [visible, setVisible] = useState(false); const toggleVisibility = (event: React.MouseEvent) => { event.stopPropagation(); setVisible((prevValue) => !prevValue); }; return (
{visible ? ( )}
)} ); }; export default ModerationOverlay;