From 66e58c74ef52be04239613fab2d8066192334c5f Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Wed, 27 Mar 2024 10:18:34 +0800 Subject: [PATCH] Shazam the filtered notifications --- src/pages/notifications.jsx | 122 +++++++++++++++++++----------------- 1 file changed, 64 insertions(+), 58 deletions(-) diff --git a/src/pages/notifications.jsx b/src/pages/notifications.jsx index a629024a..09cb4688 100644 --- a/src/pages/notifications.jsx +++ b/src/pages/notifications.jsx @@ -532,66 +532,72 @@ function Notifications({ columnMode }) { )} {supportsFilteredNotifications && notificationsPolicy?.summary?.pendingRequestsCount > 0 && ( -
-
{ - const { open } = e.target; - if (open) { - const requests = await fetchNotificationsRequest(); - setNotificationsRequests(requests); - console.log({ open, requests }); - } - }} - > - - Filtered notifications from{' '} - {notificationsPolicy.summary.pendingRequestsCount} people - - {!notificationsRequests ? ( -

- -

- ) : ( - notificationsRequests?.length > 0 && ( -
    - {notificationsRequests.map((request) => ( -
  • -
    - {!request.lastStatus?.id && ( - - )} - {request.lastStatus?.id && ( -
    - - +
    +
    +
    { + const { open } = e.target; + if (open) { + const requests = await fetchNotificationsRequest(); + setNotificationsRequests(requests); + console.log({ open, requests }); + } + }} + > + + Filtered notifications from{' '} + {notificationsPolicy.summary.pendingRequestsCount} people + + {!notificationsRequests ? ( +

    + +

    + ) : ( + notificationsRequests?.length > 0 && ( +
      + {notificationsRequests.map((request) => ( +
    • +
      + {!request.lastStatus?.id && ( + - + )} + {request.lastStatus?.id && ( +
      + + + +
      + )} +
      - )} - -
    - { - loadNotifications(true); - }} - /> -
  • - ))} -
- ) - )} -
+ { + loadNotifications(true); + }} + /> + + ))} + + ) + )} + +
+ )}