Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: account header toggle #1288

Merged
merged 2 commits into from
Jun 20, 2024
Merged

fix: account header toggle #1288

merged 2 commits into from
Jun 20, 2024

Conversation

setchy
Copy link
Member

@setchy setchy commented Jun 20, 2024

Fix toggle bug introduce during groupBy feature

@setchy setchy added the bug Something isn't working label Jun 20, 2024
@setchy setchy added this to the Release 5.10.0 milestone Jun 20, 2024
@setchy setchy merged commit 8b42763 into main Jun 20, 2024
7 checks passed
@setchy setchy deleted the fix/account-header-toggle branch June 20, 2024 03:22
? Object.values(groupedNotifications).map((repoNotifications) => {
const repoSlug = repoNotifications[0].repository.full_name;
{showAccountNotifications
? groupByRepository
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a fix, this is fine, but as code to maintain: I find this hard to reason with. i.e. What do two chained ? operators do? :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you find this easier to reason with?

{showAccountNotifications && (
  <>
    {groupByRepository
      ? Object.values(groupedNotifications).map((repoNotifications) => {
        const repoSlug = repoNotifications[0].repository.full_name;

        return (
          <RepositoryNotifications
			key={repoSlug}
			repoName={repoSlug}
			repoNotifications={repoNotifications}
		  />
		);
	  })
	: notifications.map((notification) => (
	  <NotificationRow
		key={notification.id}
		notification={notification}
	  />
	))}
  </>
)}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants