import * as React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { IconButton } from 'soapbox/components/ui'; import { useAppSelector } from 'soapbox/hooks'; const messages = defineMessages({ close: { id: 'pre_header.close', defaultMessage: 'Close' }, }); export default () => { const intl = useIntl(); const [hidden, setHidden] = React.useState(false); const siteTitle = useAppSelector((state) => state.instance.title); const handleClose = () => { localStorage.setItem('soapbox:welcome-banner', '0'); setHidden(true); }; React.useEffect(() => { const shouldBeHidden = localStorage.getItem('soapbox:welcome-banner') === '0'; setHidden(shouldBeHidden); }, []); if (hidden) { return null; } return (
Welcome to {siteTitle}
Learn More