Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

Empty notifications message #993

Open
wants to merge 2 commits into
base: 10.3.0
Choose a base branch
from
Open

Empty notifications message #993

wants to merge 2 commits into from

Conversation

joseph-maher
Copy link
Contributor

No description provided.

@joseph-maher joseph-maher requested a review from c7yrus April 21, 2023 06:00
<MenuList>
{!!isTenant
? notificationWholeData.map(notification => (
{isNullOrUndefinedOrEmpty(notificationWholeData) &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

all that is required is for you to check the notification count and only show the menulist if the notification count is equal or grater than 1.

ie:
{notificationCount >= 1 && ( <MenuList> {!!isTenant ? notificationWholeData.map(notification => ( <NotificationHandler key={notification?.name} parentCode={NOTIFICATION_GROUP} code={notification?.question?.code || ''} sourceCode={sourceCode} targetCode={targetCode} /> )) : notification .reverse() .map(notification => ( <NotificationHandler key={notification} parentCode={NOTIFICATION_GROUP} code={notification} /> ))} </MenuList> )}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I considered hiding the list outright, but the list not appearing when the button is clicked might be confusing for the user as it provides no feedback. Will implement the notificationCount check, was not aware of that

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants