Fix missing homepage placeholder while waiting for livestream data (#904)

## Issue
When loading the homepage, I kept seeing a blank page with footer first. Even Google is picking it up.

## Ticket
572 Slow appearance of tiles

## Notes
The tiles were originally delayed to prevent the "Upcoming Livestream" section from causing layout shifts.

With the new theme, the footer would cause a visible shift anyway.  Hiding the footer is one solution, but I think not showing anything until the fetch is done is bad because the livestream fetch could stall.
This commit is contained in:
infinite-persistence 2022-02-17 06:18:49 -08:00 committed by GitHub
parent 95f90d8a84
commit 678a160f7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -185,13 +185,13 @@ function HomePage(props: Props) {
{authenticated && hasScheduledStreams && !hideScheduledLivestreams && ( {authenticated && hasScheduledStreams && !hideScheduledLivestreams && (
<SectionHeader title={__('Following')} navigate={`/$/${PAGES.CHANNELS_FOLLOWING}`} icon={ICONS.SUBSCRIBE} /> <SectionHeader title={__('Following')} navigate={`/$/${PAGES.CHANNELS_FOLLOWING}`} icon={ICONS.SUBSCRIBE} />
)} )}
{rowData.map(({ title, route, link, icon, help, pinnedUrls: pinUrls, options = {} }, index) => {
// add pins here
return getRowElements(title, route, link, icon, help, options, index, pinUrls);
})}
</> </>
)} )}
{rowData.map(({ title, route, link, icon, help, pinnedUrls: pinUrls, options = {} }, index) => {
// add pins here
return getRowElements(title, route, link, icon, help, options, index, pinUrls);
})}
</Page> </Page>
); );
} }