Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Improve InviteUsers interface#63383

Merged
vdavid merged 1 commit into
mainfrom
dv/improve-inviteusers-interface
Jun 20, 2024
Merged

Improve InviteUsers interface#63383
vdavid merged 1 commit into
mainfrom
dv/improve-inviteusers-interface

Conversation

@vdavid

@vdavid vdavid commented Jun 20, 2024

Copy link
Copy Markdown
Contributor

const subscriptionSummaryQueryResult = useSubscriptionSummary()
const isAdmin = subscriptionSummaryQueryResult?.data?.userRole === 'admin'
const teamId = subscriptionSummaryQueryResult?.data?.teamId
const isAdmin = subscriptionSummary.userRole === 'admin'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If InviteUsers is rendered only for admins we can skip isAdmin logic here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Well, but then the users of this component need to be aware of that requirement, which leaves room for error. I want to ensure admin privileges inside the component.

@vdavid vdavid merged commit 2a02d7c into main Jun 20, 2024
@vdavid vdavid deleted the dv/improve-inviteusers-interface branch June 20, 2024 10:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants