From 85a093597509a345e6e65af53fee45b5dc7905cb Mon Sep 17 00:00:00 2001
From: sundasnoreen12 <72802712+sundasnoreen12@users.noreply.github.com>
Date: Wed, 13 Nov 2024 13:16:58 +0500
Subject: [PATCH] fix: fixed tab click issue (#612)
---
src/Notification/NotificationSections.jsx | 2 +-
src/Notification/index.jsx | 42 +++++++++++------------
src/Notification/notification.scss | 8 -----
3 files changed, 22 insertions(+), 30 deletions(-)
diff --git a/src/Notification/NotificationSections.jsx b/src/Notification/NotificationSections.jsx
index 7161b1f2..d5e53089 100644
--- a/src/Notification/NotificationSections.jsx
+++ b/src/Notification/NotificationSections.jsx
@@ -94,7 +94,7 @@ const NotificationSections = () => {
>
{renderNotificationSection('today', today)}
{renderNotificationSection('earlier', earlier)}
- {(hasMorePages === undefined || hasMorePages) && notificationListStatus === RequestStatus.IN_PROGRESS ? (
+ {notificationListStatus === RequestStatus.IN_PROGRESS ? (
diff --git a/src/Notification/index.jsx b/src/Notification/index.jsx
index af65e2a5..4714b90a 100644
--- a/src/Notification/index.jsx
+++ b/src/Notification/index.jsx
@@ -81,9 +81,9 @@ const Notifications = ({ notificationAppData, showLeftMargin }) => {
setAppName(selectedAppName);
setNotificationData(prevData => ({
...prevData,
- ...{ notificationListStatus: RequestStatus.IDLE },
+ ...{ notificationListStatus: appName === selectedAppName ? RequestStatus.SUCCESSFUL : RequestStatus.IN_PROGRESS },
}));
- }, []);
+ }, [appName]);
const updateNotificationData = useCallback((data) => {
setNotificationData(prevData => ({
@@ -150,13 +150,13 @@ const Notifications = ({ notificationAppData, showLeftMargin }) => {
{getConfig().NOTIFICATION_FEEDBACK_URL && (
-
+
)}
@@ -178,18 +178,18 @@ const Notifications = ({ notificationAppData, showLeftMargin }) => {
data-testid="notification-bell-icon"
/>
{tabsCount?.count > 0 && (
- = 10,
- 'notification-badge-rounded': tabsCount.count < 10,
- })}
- onClick={toggleNotificationTray}
- >
- {tabsCount.count >= 100 ?
- : tabsCount.count}
-
+ = 10,
+ 'notification-badge-rounded': tabsCount.count < 10,
+ })}
+ onClick={toggleNotificationTray}
+ >
+ {tabsCount.count >= 100 ?
+ : tabsCount.count}
+
)}
diff --git a/src/Notification/notification.scss b/src/Notification/notification.scss
index 1658f4b3..53c4f363 100644
--- a/src/Notification/notification.scss
+++ b/src/Notification/notification.scss
@@ -157,14 +157,6 @@
height: 10px;
width: 10px;
}
-
- .nav-tabs .nav-link {
- &:focus {
- &::before {
- border: none !important;
- }
- }
- }
}
.notification-feedback-widget {