Remove Preheader files
This commit is contained in:
parent
8083b4b6e3
commit
6b281c72a3
|
@ -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 { fetchScheduledStatuses } from '../../actions/scheduled_statuses';
|
||||||
import { connectUserStream } from '../../actions/streaming';
|
import { connectUserStream } from '../../actions/streaming';
|
||||||
import { expandHomeTimeline } from '../../actions/timelines';
|
import { expandHomeTimeline } from '../../actions/timelines';
|
||||||
// import PreHeader from '../../features/public_layout/components/pre_header';
|
|
||||||
// import GroupSidebarPanel from '../groups/sidebar_panel';
|
// import GroupSidebarPanel from '../groups/sidebar_panel';
|
||||||
|
|
||||||
import BackgroundShapes from './components/background_shapes';
|
import BackgroundShapes from './components/background_shapes';
|
||||||
|
@ -727,7 +726,6 @@ class UI extends React.PureComponent {
|
||||||
<BackgroundShapes />
|
<BackgroundShapes />
|
||||||
|
|
||||||
<div className='z-10 flex flex-col'>
|
<div className='z-10 flex flex-col'>
|
||||||
{/* <PreHeader /> */}
|
|
||||||
<Navbar />
|
<Navbar />
|
||||||
|
|
||||||
<SwitchingColumnsArea location={location} onLayoutChange={this.handleLayoutChange} soapbox={soapbox} features={features}>
|
<SwitchingColumnsArea location={location} onLayoutChange={this.handleLayoutChange} soapbox={soapbox} features={features}>
|
||||||
|
|
Loading…
Reference in New Issue