2023-06-14 05:11:39 -07:00
|
|
|
import React from 'react';
|
|
|
|
|
|
|
|
import LinkFooter from 'soapbox/features/ui/components/link-footer';
|
|
|
|
import {
|
|
|
|
WhoToFollowPanel,
|
|
|
|
TrendsPanel,
|
|
|
|
SignUpPanel,
|
|
|
|
CtaBanner,
|
|
|
|
} from 'soapbox/features/ui/util/async-components';
|
|
|
|
import { useAppSelector, useFeatures } from 'soapbox/hooks';
|
|
|
|
|
|
|
|
import { Layout } from '../components/ui';
|
|
|
|
|
|
|
|
interface ISearchPage {
|
2023-10-02 11:54:02 -07:00
|
|
|
children: React.ReactNode;
|
2023-06-14 05:11:39 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
const SearchPage: React.FC<ISearchPage> = ({ children }) => {
|
|
|
|
const me = useAppSelector(state => state.me);
|
|
|
|
const features = useFeatures();
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<Layout.Main>
|
|
|
|
{children}
|
|
|
|
|
|
|
|
{!me && (
|
2023-10-07 15:14:45 -07:00
|
|
|
<CtaBanner />
|
2023-06-14 05:11:39 -07:00
|
|
|
)}
|
|
|
|
</Layout.Main>
|
|
|
|
|
|
|
|
<Layout.Aside>
|
|
|
|
{!me && (
|
2023-10-07 15:14:45 -07:00
|
|
|
<SignUpPanel />
|
2023-06-14 05:11:39 -07:00
|
|
|
)}
|
|
|
|
|
|
|
|
{features.trends && (
|
2023-10-07 15:14:45 -07:00
|
|
|
<TrendsPanel limit={5} />
|
2023-06-14 05:11:39 -07:00
|
|
|
)}
|
|
|
|
|
|
|
|
{me && features.suggestions && (
|
2023-10-07 15:14:45 -07:00
|
|
|
<WhoToFollowPanel limit={3} />
|
2023-06-14 05:11:39 -07:00
|
|
|
)}
|
|
|
|
|
2023-10-07 15:14:45 -07:00
|
|
|
<LinkFooter />
|
2023-06-14 05:11:39 -07:00
|
|
|
</Layout.Aside>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2024-05-13 10:00:42 -07:00
|
|
|
export { SearchPage as default };
|