Avoid flash of page nav
This commit is contained in:
parent
773dcc0285
commit
9f710c932f
|
@ -98,7 +98,8 @@ function NotificationsList(props: { privateUser: PrivateUser }) {
|
||||||
setPaginatedGroupedNotifications(maxNotificationsToShow)
|
setPaginatedGroupedNotifications(maxNotificationsToShow)
|
||||||
}, [allGroupedNotifications, page])
|
}, [allGroupedNotifications, page])
|
||||||
|
|
||||||
if (!paginatedGroupedNotifications) return <LoadingIndicator />
|
if (!paginatedGroupedNotifications || !allGroupedNotifications)
|
||||||
|
return <LoadingIndicator />
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={'min-h-[100vh]'}>
|
<div className={'min-h-[100vh]'}>
|
||||||
|
@ -127,7 +128,7 @@ function NotificationsList(props: { privateUser: PrivateUser }) {
|
||||||
/>
|
/>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
{allGroupedNotifications &&
|
{paginatedGroupedNotifications.length > 0 &&
|
||||||
allGroupedNotifications.length > NOTIFICATIONS_PER_PAGE && (
|
allGroupedNotifications.length > NOTIFICATIONS_PER_PAGE && (
|
||||||
<nav
|
<nav
|
||||||
className="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6"
|
className="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user