LandingTimeline: display About page instead of the feed if the feed is restricted by the API

This commit is contained in:
Alex Gleason 2023-09-24 12:58:58 -05:00
parent 8500e7bb9a
commit 8bbf454af4
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -7,6 +7,7 @@ import PullToRefresh from 'soapbox/components/pull-to-refresh';
import { Column } from 'soapbox/components/ui'; import { Column } from 'soapbox/components/ui';
import { useAppSelector, useAppDispatch, useInstance } from 'soapbox/hooks'; import { useAppSelector, useAppDispatch, useInstance } from 'soapbox/hooks';
import AboutPage from '../about';
import Timeline from '../ui/components/timeline'; import Timeline from '../ui/components/timeline';
import { SiteBanner } from './components/site-banner'; import { SiteBanner } from './components/site-banner';
@ -46,7 +47,7 @@ const LandingTimeline = () => {
<SiteBanner /> <SiteBanner />
</div> </div>
{timelineEnabled && ( {timelineEnabled ? (
<PullToRefresh onRefresh={handleRefresh}> <PullToRefresh onRefresh={handleRefresh}>
<Timeline <Timeline
scrollKey={`${timelineId}_timeline`} scrollKey={`${timelineId}_timeline`}
@ -57,6 +58,8 @@ const LandingTimeline = () => {
divideType='space' divideType='space'
/> />
</PullToRefresh> </PullToRefresh>
) : (
<AboutPage />
)} )}
</Column> </Column>
); );