44 lines
943 B
TypeScript
44 lines
943 B
TypeScript
import React from 'react';
|
|
|
|
import LinkFooter from 'soapbox/features/ui/components/link-footer';
|
|
import {
|
|
TrendsPanel,
|
|
SignUpPanel,
|
|
CtaBanner,
|
|
} from 'soapbox/features/ui/util/async-components';
|
|
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
|
|
|
import { Layout } from '../components/ui';
|
|
|
|
interface ILandingPage {
|
|
children: React.ReactNode;
|
|
}
|
|
|
|
const LandingPage: React.FC<ILandingPage> = ({ children }) => {
|
|
const me = useAppSelector(state => state.me);
|
|
const features = useFeatures();
|
|
|
|
return (
|
|
<>
|
|
<Layout.Main className='space-y-3 pt-3 dark:divide-gray-800 sm:pt-0'>
|
|
{children}
|
|
|
|
{!me && (
|
|
<CtaBanner />
|
|
)}
|
|
</Layout.Main>
|
|
|
|
<Layout.Aside>
|
|
{!me && (
|
|
<SignUpPanel />
|
|
)}
|
|
{features.trends && (
|
|
<TrendsPanel limit={5} />
|
|
)}
|
|
<LinkFooter />
|
|
</Layout.Aside>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default LandingPage;
|