Homepage: don't wait for prefs if incognito

It causes the "empty homepage" splash to briefly appear.
This commit is contained in:
infinite-persistence 2022-03-25 19:09:17 +08:00 committed by Thomas Zarebczan
parent 093594de3f
commit 616309301d

View file

@ -79,7 +79,7 @@ function HomePage(props: Props) {
// TODO: probably need memo, or incorporate into GetLinksData. // TODO: probably need memo, or incorporate into GetLinksData.
let sortedRowData: Array<RowDataItem> = []; let sortedRowData: Array<RowDataItem> = [];
if (homepageOrder.active) { if (homepageOrder.active && authenticated) {
homepageOrder.active.forEach((key) => { homepageOrder.active.forEach((key) => {
const item = rowData.find((data) => data.id === key); const item = rowData.find((data) => data.id === key);
if (item) { if (item) {
@ -220,7 +220,7 @@ function HomePage(props: Props) {
</> </>
)} )}
{sortedRowData.length === 0 && ( {sortedRowData.length === 0 && authenticated && (
<div className="empty--centered"> <div className="empty--centered">
<Yrbl <Yrbl
alwaysShow alwaysShow