From 8e330868f611ff10582117f844ff2f4eda9188ab Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 3 Jul 2025 13:33:05 +1000 Subject: [PATCH] [UI] Notification Drawer (#9940) - Handle error case - Visual updates --- .../src/components/nav/NotificationDrawer.tsx | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/src/frontend/src/components/nav/NotificationDrawer.tsx b/src/frontend/src/components/nav/NotificationDrawer.tsx index ee5901c428..b8f93ea8ed 100644 --- a/src/frontend/src/components/nav/NotificationDrawer.tsx +++ b/src/frontend/src/components/nav/NotificationDrawer.tsx @@ -13,7 +13,12 @@ import { Text, Tooltip } from '@mantine/core'; -import { IconArrowRight, IconBellCheck } from '@tabler/icons-react'; +import { + IconArrowRight, + IconBellCheck, + IconCircleCheck, + IconExclamationCircle +} from '@tabler/icons-react'; import { useQuery } from '@tanstack/react-query'; import { useCallback, useMemo } from 'react'; import { useNavigate } from 'react-router-dom'; @@ -203,11 +208,14 @@ export function NotificationDrawer({ - {!hasNotifications && ( - - {t`You have no unread notifications.`} - - )} + {!notificationQuery.isFetching && + !notificationQuery.isLoading && + !notificationQuery.isError && + !hasNotifications && ( + }> + {t`You have no unread notifications.`} + + )} {hasNotifications && notificationQuery.data?.results?.map((notification: any) => ( )} + {notificationQuery.isError && ( + } + > + {t`Error loading notifications.`} + + )}