import classNames from 'classnames'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { Button } from 'soapbox/components/ui'; import { Modal } from 'soapbox/components/ui'; import { useAppSelector, useFeatures, useSoapboxConfig } from 'soapbox/hooks'; const messages = defineMessages({ download: { id: 'landing_page_modal.download', defaultMessage: 'Download' }, helpCenter: { id: 'landing_page_modal.helpCenter', defaultMessage: 'Help Center' }, login: { id: 'header.login.label', defaultMessage: 'Log in' }, register: { id: 'header.register.label', defaultMessage: 'Register' }, }); interface ILandingPageModal { onClose: (type: string) => void, } const LandingPageModal: React.FC = ({ onClose }) => { const intl = useIntl(); const { logo } = useSoapboxConfig(); const instance = useAppSelector((state) => state.instance); const features = useFeatures(); const isOpen = instance.get('registrations', false) === true; const pepeOpen = useAppSelector(state => state.verification.getIn(['instance', 'registrations'], false) === true); return ( } onClose={() => onClose('LANDING_PAGE')} >
{(isOpen || features.pepe && pepeOpen) && ( )}
); }; export default LandingPageModal;