Avoid flash of page nav

This commit is contained in:
Ian Philips 2022-07-07 10:16:38 -06:00
parent 773dcc0285
commit 9f710c932f

View File

@ -98,7 +98,8 @@ function NotificationsList(props: { privateUser: PrivateUser }) {
setPaginatedGroupedNotifications(maxNotificationsToShow)
}, [allGroupedNotifications, page])
if (!paginatedGroupedNotifications) return <LoadingIndicator />
if (!paginatedGroupedNotifications || !allGroupedNotifications)
return <LoadingIndicator />
return (
<div className={'min-h-[100vh]'}>
@ -127,7 +128,7 @@ function NotificationsList(props: { privateUser: PrivateUser }) {
/>
)
)}
{allGroupedNotifications &&
{paginatedGroupedNotifications.length > 0 &&
allGroupedNotifications.length > NOTIFICATIONS_PER_PAGE && (
<nav
className="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6"