diff --git a/app/(home-pages)/notifications/NotificationList.tsx b/app/(home-pages)/notifications/NotificationList.tsx index 1f1d1fb5..da3fd115 100644 --- a/app/(home-pages)/notifications/NotificationList.tsx +++ b/app/(home-pages)/notifications/NotificationList.tsx @@ -19,6 +19,13 @@ export function NotificationList({ let { rootEntity } = useReplicache(); let cardBorderHidden = useEntity(rootEntity, "theme/card-border-hidden")?.data .value; + + if (notifications.length === 0) + return ( +
+ no notifications yet... +
+ ); return (
diff --git a/components/ActionBar/Navigation.tsx b/components/ActionBar/Navigation.tsx index 0ff4240e..8edb9a1a 100644 --- a/components/ActionBar/Navigation.tsx +++ b/components/ActionBar/Navigation.tsx @@ -26,6 +26,7 @@ import { markAsRead, } from "app/(home-pages)/notifications/getNotifications"; import { DotLoader } from "components/utils/DotLoader"; +import { NotificationList } from "app/(home-pages)/notifications/NotificationList"; export type navPages = "home" | "reader" | "pub" | "discover" | "notifications"; @@ -203,33 +204,24 @@ export function NotificationButton(props: { current?: boolean }) { /> } > -
- {isLoading ? ( -
- loading - -
- ) : ( - notifications?.map((n) => { - if (n.type === "comment") { - n; - return ( - - ); - } - }) - )} -
- - See All - + {isLoading ? ( +
+ loading + +
+ ) : ( + <> + + {notifications && notifications.length > 0 && ( + + See All + + )} + + )} ); }