From 3dba18d31fa2744e8153eceb28bf58bb46dd6f79 Mon Sep 17 00:00:00 2001 From: Nitika Nirwani Date: Mon, 6 Jul 2026 19:45:37 +0530 Subject: [PATCH] feat: add empty state for notifications --- frontend/src/routes/_app.notifications.tsx | 45 ++++++++++++++++++---- 1 file changed, 37 insertions(+), 8 deletions(-) diff --git a/frontend/src/routes/_app.notifications.tsx b/frontend/src/routes/_app.notifications.tsx index 95991e19..1c51f77e 100644 --- a/frontend/src/routes/_app.notifications.tsx +++ b/frontend/src/routes/_app.notifications.tsx @@ -3,6 +3,7 @@ import { useQuery } from "@tanstack/react-query"; import { notificationsService } from "@/services"; import { Card } from "@/components/shared/primitives"; import { cn } from "@/lib/utils"; +import { Bell } from "lucide-react"; export const Route = createFileRoute("/_app/notifications")({ head: () => ({ @@ -15,7 +16,10 @@ export const Route = createFileRoute("/_app/notifications")({ }); function NotificationsPage() { - const { data = [] } = useQuery({ queryKey: ["notifications"], queryFn: notificationsService.list }); + const { data = [] } = useQuery({ + queryKey: ["notifications"], + queryFn: notificationsService.list, + }); return (
@@ -29,13 +33,38 @@ function NotificationsPage() {
    - {data.map((n) => ( -
  • - -

    {n.text}

    - {n.ago} -
  • - ))} + {data.length === 0 ? ( +
    + +

    No notifications yet

    +

    + You're all caught up! New notifications will appear here. +

    +
    + ) : ( + data.map((n) => ( +
  • + +

    + {n.text} +

    + + {n.ago} + +
  • + )) + )}