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

show relevant options for buttons #481

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

muskanbatra-dev
Copy link

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?

  • Yes

No

*Tested on:
Platforms

  • Web

Browsers

  • Chrome

  • Safari

  • Firefox

Before Change Screenshots
Before:
https://www.loom.com/share/cd25966dbd9943da866b34d8efe85b94

After:
https://www.loom.com/share/2a58206fc7ba452aab4aa2e2822db5de

@vercel
Copy link

vercel bot commented Nov 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
website-members ✅ Ready (Inspect) Visit Preview Nov 4, 2022 at 6:29PM (UTC)

Copy link
Contributor

@vinayak-trivedi vinayak-trivedi left a 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

Comment on lines +45 to +59
if (isUserMember) {
return (
<>
<button
className={classNames.moveToMember}
type="button"
onClick={() => archiveTheMember(selectedMember)}
>
Archive Member
</button>
<br />
<p>{updateStatus}</p>
</>
);
}
Copy link
Contributor

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

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

Successfully merging this pull request may close these issues.

2 participants