2022-08-12 08:15:21 -07:00
|
|
|
import React from 'react';
|
|
|
|
|
2022-11-16 05:32:32 -08:00
|
|
|
import LinkFooter from 'soapbox/features/ui/components/link-footer';
|
2022-08-12 08:15:21 -07:00
|
|
|
import {
|
|
|
|
WhoToFollowPanel,
|
|
|
|
TrendsPanel,
|
|
|
|
SignUpPanel,
|
|
|
|
CtaBanner,
|
|
|
|
} from 'soapbox/features/ui/util/async-components';
|
|
|
|
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
|
|
|
|
|
|
|
import { Layout } from '../components/ui';
|
2022-11-16 05:32:32 -08:00
|
|
|
import BundleContainer from '../features/ui/containers/bundle-container';
|
2022-08-12 08:15:21 -07:00
|
|
|
|
|
|
|
interface IStatusPage {
|
|
|
|
children: React.ReactNode,
|
|
|
|
}
|
|
|
|
|
|
|
|
const StatusPage: React.FC<IStatusPage> = ({ children }) => {
|
|
|
|
const me = useAppSelector(state => state.me);
|
|
|
|
const features = useFeatures();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Layout.Main>
|
|
|
|
{children}
|
|
|
|
|
|
|
|
{!me && (
|
|
|
|
<BundleContainer fetchComponent={CtaBanner}>
|
|
|
|
{Component => <Component key='cta-banner' />}
|
|
|
|
</BundleContainer>
|
|
|
|
)}
|
|
|
|
</Layout.Main>
|
|
|
|
|
|
|
|
<Layout.Aside>
|
|
|
|
{!me && (
|
|
|
|
<BundleContainer fetchComponent={SignUpPanel}>
|
|
|
|
{Component => <Component key='sign-up-panel' />}
|
|
|
|
</BundleContainer>
|
|
|
|
)}
|
|
|
|
{features.trends && (
|
|
|
|
<BundleContainer fetchComponent={TrendsPanel}>
|
2022-10-13 09:00:44 -07:00
|
|
|
{Component => <Component limit={5} key='trends-panel' />}
|
2022-08-12 08:15:21 -07:00
|
|
|
</BundleContainer>
|
|
|
|
)}
|
2022-10-09 15:32:09 -07:00
|
|
|
{me && features.suggestions && (
|
2022-08-12 08:15:21 -07:00
|
|
|
<BundleContainer fetchComponent={WhoToFollowPanel}>
|
2022-09-26 12:22:00 -07:00
|
|
|
{Component => <Component limit={3} key='wtf-panel' />}
|
2022-08-12 08:15:21 -07:00
|
|
|
</BundleContainer>
|
|
|
|
)}
|
|
|
|
<LinkFooter key='link-footer' />
|
|
|
|
</Layout.Aside>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default StatusPage;
|