Merge branch 'remove-preheader' into 'next'

Remove Preheader files

See merge request soapbox-pub/soapbox-fe!1220
next-virtuoso-proof
Justin 2 years ago
commit 42396c4c4c

@ -1,59 +0,0 @@
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 (
<div className='bg-primary-900 z-10'>
<div className='max-w-7xl flex justify-between mx-auto px-2 sm:px-6 lg:px-8'>
<div className='h-14 flex items-center space-x-3'>
<p className='text-white font-semibold'>
<span>Welcome to {siteTitle}</span>
</p>
<Link className='text-sea-blue text-sm lowercase hover:underline' to='/beta'>
Learn More
</Link>
</div>
<div className='flex items-center'>
<IconButton
transparent
src={require('@tabler/icons/icons/x.svg')}
onClick={handleClose}
title={intl.formatMessage(messages.close)}
className='bg-transparent text-white text-opacity-75'
iconClassName='w-5 h-5'
/>
</div>
</div>
</div>
);
};

@ -41,7 +41,6 @@ import { expandNotifications } from '../../actions/notifications';
import { fetchScheduledStatuses } from '../../actions/scheduled_statuses';
import { connectUserStream } from '../../actions/streaming';
import { expandHomeTimeline } from '../../actions/timelines';
// import PreHeader from '../../features/public_layout/components/pre_header';
// import GroupSidebarPanel from '../groups/sidebar_panel';
import BackgroundShapes from './components/background_shapes';
@ -729,7 +728,6 @@ class UI extends React.PureComponent {
<BackgroundShapes />
<div className='z-10 flex flex-col'>
{/* <PreHeader /> */}
<Navbar />
<SwitchingColumnsArea location={location} onLayoutChange={this.handleLayoutChange} soapbox={soapbox} features={features}>

Loading…
Cancel
Save