From 916080d37adbe497cf5b372fa659f990ab5382b7 Mon Sep 17 00:00:00 2001 From: james acklin <748181+jamesacklin@users.noreply.github.com> Date: Thu, 19 Jan 2023 10:52:02 -0500 Subject: [PATCH] Update ui/src/nav/notifications/Notification.tsx Co-authored-by: tomholford <16504501+tomholford@users.noreply.github.com> --- ui/src/nav/notifications/Notification.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/ui/src/nav/notifications/Notification.tsx b/ui/src/nav/notifications/Notification.tsx index 3ad2b06..f81e997 100644 --- a/ui/src/nav/notifications/Notification.tsx +++ b/ui/src/nav/notifications/Notification.tsx @@ -28,11 +28,13 @@ function makePrettyTime(date: Date) { function getNotificationType(rope: Rope): NotificationType { if ( - rope.thread.endsWith('/channel/edit') || - rope.thread.endsWith('/channel/add') || - rope.thread.endsWith('/channel/del') || - rope.thread.endsWith('/joins') || - rope.thread.endsWith('/leaves') + [ + '/channel/edit', + '/channel/add', + '/channel/del', + '/joins', + '/leaves' + ].some((thread) => rope.thread.endsWith(thread)) ) { return 'group-meta'; }