import React, { useRef } from 'react'; import { Link } from 'react-router-dom'; import FeedCarousel from 'soapbox/features/feed-filtering/feed-carousel'; import LinkFooter from 'soapbox/features/ui/components/link-footer'; import { WhoToFollowPanel, TrendsPanel, SignUpPanel, PromoPanel, FundingPanel, CryptoDonatePanel, BirthdayPanel, CtaBanner, AnnouncementsPanel, } from 'soapbox/features/ui/util/async-components'; import { useAppSelector, useOwnAccount, useFeatures, useSoapboxConfig } from 'soapbox/hooks'; import Avatar from '../components/avatar'; import { Card, CardBody, HStack, Layout } from '../components/ui'; import ComposeForm from '../features/compose/components/compose-form'; import BundleContainer from '../features/ui/containers/bundle-container'; // import GroupSidebarPanel from '../features/groups/sidebar_panel'; const HomePage: React.FC = ({ children }) => { const me = useAppSelector(state => state.me); const account = useOwnAccount(); const features = useFeatures(); const soapboxConfig = useSoapboxConfig(); const composeBlock = useRef(null); const hasPatron = soapboxConfig.extensions.getIn(['patron', 'enabled']) === true; const hasCrypto = typeof soapboxConfig.cryptoAddresses.getIn([0, 'ticker']) === 'string'; const cryptoLimit = soapboxConfig.cryptoDonatePanel.get('limit', 0); const acct = account ? account.acct : ''; return ( <> {me && ( )} {features.feedUserFiltering && } {children} {!me && ( {Component => } )} {!me && ( {Component => } )} {me && features.announcements && ( {Component => } )} {features.trends && ( {Component => } )} {hasPatron && ( {Component => } )} {hasCrypto && cryptoLimit > 0 && ( {Component => } )} {Component => } {features.birthdays && ( {Component => } )} {me && features.suggestions && ( {Component => } )} ); }; export default HomePage;