From c78539dcb4c3534870c4a03f30d893816d3f2296 Mon Sep 17 00:00:00 2001 From: aliang Date: Thu, 19 Dec 2024 18:27:51 +0700 Subject: [PATCH] chore(ui): remove navigation logic from notifications (#3596) * chore(ui): remove navigation logic from notifications * update --- ee/tabby-ui/components/notification-box.tsx | 41 ++++----------------- 1 file changed, 7 insertions(+), 34 deletions(-) diff --git a/ee/tabby-ui/components/notification-box.tsx b/ee/tabby-ui/components/notification-box.tsx index 19a37d04339c..7bb1ea44827e 100644 --- a/ee/tabby-ui/components/notification-box.tsx +++ b/ee/tabby-ui/components/notification-box.tsx @@ -21,7 +21,7 @@ import { DropdownMenuContent, DropdownMenuTrigger } from './ui/dropdown-menu' -import { IconArrowRight, IconBell, IconCheck } from './ui/icons' +import { IconBell, IconCheck } from './ui/icons' import { Separator } from './ui/separator' import { Tabs, TabsList, TabsTrigger } from './ui/tabs' @@ -156,7 +156,7 @@ interface NotificationItemProps extends HTMLAttributes { } function NotificationItem({ data }: NotificationItemProps) { - const { type, title, content } = resolveNotification(data.content) + const { title, content } = resolveNotification(data.content) const markNotificationsRead = useMutation(markNotificationsReadMutation) @@ -166,26 +166,16 @@ function NotificationItem({ data }: NotificationItemProps) { }) } - const onAction = () => { - onClickMarkRead() - - if (type === 'license_will_expire') { - return window.open('/settings/subscription') - } - } - return ( -
-
-
+
+
+
{!data.read && ( )} - - {title} - + {title}
-
+
{content}
@@ -194,14 +184,6 @@ function NotificationItem({ data }: NotificationItemProps) { {formatNotificationTime(data.createdAt)}
- {!data.read && (