-
Notifications
You must be signed in to change notification settings - Fork 131
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
show relevant options for buttons #481
base: develop
Are you sure you want to change the base?
show relevant options for buttons #481
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @muskanbatra-dev
Requesting one change, and also please add test cases for the changes
if (isUserMember) { | ||
return ( | ||
<> | ||
<button | ||
className={classNames.moveToMember} | ||
type="button" | ||
onClick={() => archiveTheMember(selectedMember)} | ||
> | ||
Archive Member | ||
</button> | ||
<br /> | ||
<p>{updateStatus}</p> | ||
</> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need only one button when the user is a member, so instead of repeating yourself, you can put a condition below where the promote to member button only shows up if the user is not a member, also can you change the text in the button to archive user
if the user is not a member
What is the change?
when the super clicks on the setting button to update the role of an existing member he should see only the archive member option.
when he clicks on non-member he should see promote to member and archive button.
Is it a bug?
No
*Dev Tested?
No
*Tested on:
Platforms
Browsers
Chrome
Safari
Firefox
Before Change Screenshots
Before:
https://www.loom.com/share/cd25966dbd9943da866b34d8efe85b94
After:
https://www.loom.com/share/2a58206fc7ba452aab4aa2e2822db5de