import clsx from 'clsx'; import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import SiteLogo from 'soapbox/components/site-logo'; import { Text, Button, Icon, Modal } from 'soapbox/components/ui'; import { useRegistrationStatus, 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 } /** Login and links to display from the hamburger menu of the homepage. */ const LandingPageModal: React.FC = ({ onClose }) => { const intl = useIntl(); const soapboxConfig = useSoapboxConfig(); const { isOpen } = useRegistrationStatus(); const { links } = soapboxConfig; return ( } onClose={() => onClose('LANDING_PAGE')} >
{links.get('help') && ( )}
{isOpen && ( )}
); }; export default LandingPageModal;