From adbe8838919cc918ad23933f449e126bda76c3d0 Mon Sep 17 00:00:00 2001 From: Ellen Kraffmiller Date: Fri, 1 Nov 2024 09:59:41 -0400 Subject: [PATCH] return null instead of Skeleton while root collection is loading --- src/sections/layout/header/LoggedInHeaderActions.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sections/layout/header/LoggedInHeaderActions.tsx b/src/sections/layout/header/LoggedInHeaderActions.tsx index 619241318..3aec88b67 100644 --- a/src/sections/layout/header/LoggedInHeaderActions.tsx +++ b/src/sections/layout/header/LoggedInHeaderActions.tsx @@ -8,7 +8,7 @@ import { User } from '../../../users/domain/models/User' import { CollectionRepository } from '../../../collection/domain/repositories/CollectionRepository' import { AccountHelper } from '../../account/AccountHelper' import { useCollection } from '@/sections/collection/useCollection' -import Skeleton from 'react-loading-skeleton' +import { PageNotFound } from '@/sections/page-not-found/PageNotFound' const currentPage = 0 @@ -36,11 +36,12 @@ export const LoggedInHeaderActions = ({ navigate(currentPage) }) } - if (isLoading) { - return + + if (!isLoading && !collection) { + return } - if (!collection) { + if (isLoading || !collection) { return null }