From 8b427638b0eb1be729bf25ca02741303108130ff Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Wed, 19 Jun 2024 23:22:16 -0400 Subject: [PATCH] fix: account header toggle (#1288) --- src/components/AccountNotifications.tsx | 34 +- .../AccountNotifications.test.tsx.snap | 318 ------------------ 2 files changed, 18 insertions(+), 334 deletions(-) diff --git a/src/components/AccountNotifications.tsx b/src/components/AccountNotifications.tsx index b96e5625f..ad54f272d 100644 --- a/src/components/AccountNotifications.tsx +++ b/src/components/AccountNotifications.tsx @@ -91,24 +91,26 @@ export const AccountNotifications: FC = ( )} - {showAccountNotifications && groupByRepository - ? Object.values(groupedNotifications).map((repoNotifications) => { - const repoSlug = repoNotifications[0].repository.full_name; + {showAccountNotifications + ? groupByRepository + ? Object.values(groupedNotifications).map((repoNotifications) => { + const repoSlug = repoNotifications[0].repository.full_name; - return ( - + ); + }) + : notifications.map((notification) => ( + - ); - }) - : notifications.map((notification) => ( - - ))} + )) + : null} ); }; diff --git a/src/components/__snapshots__/AccountNotifications.test.tsx.snap b/src/components/__snapshots__/AccountNotifications.test.tsx.snap index 30d9dfb62..db8dd0097 100644 --- a/src/components/__snapshots__/AccountNotifications.test.tsx.snap +++ b/src/components/__snapshots__/AccountNotifications.test.tsx.snap @@ -1317,324 +1317,6 @@ exports[`components/AccountNotifications.tsx should toggle account notifications -
-
- - - - -
-
-
- I am a robot and this is a test! -
-
- -
- Updated -
-
- 7 years ago -
-
- - -
-
-
-
- - - -
-
-
-
- - - - -
-
-
- Improve the UI -
-
-
- -
-
- Authored -
-
- 7 years ago -
-
-
-
-
- - - -
-