Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: show an error when a user doesn't have permission to view the health page#16580

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

brettkolodny
Copy link
Contributor

No description provided.

@brettkolodnybrettkolodny changed the titlefix: show an error notification when a user doesn't have permission to view the health pagefix: show an error when a user doesn't have permission to view the health pageFeb 14, 2025
Copy link
Member

@aslilacaslilac left a comment
edited
Loading

Choose a reason for hiding this comment

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

Typically for this sort of thing, we prefer early returns over checks using ternaries. It helps keep the mainreturn focused on rendering the page and makes it clearer when other states are special cases.

A good example of a page that does this right isGroupPage.tsx

While you're at it, could you turn the<Loader /> case into an early return as well?

brettkolodny reacted with thumbs up emoji
@brettkolodny
Copy link
ContributorAuthor

Moved the checks for loading/error outside of the ternary, and then based onthis line fromGroupPage.tsx removed the ternary entirely

@brettkolodnybrettkolodny merged commit4732f08 intomainFeb 19, 2025
30 checks passed
@brettkolodnybrettkolodny deleted the brett/redirect-unpermissioned-users-on-health branchFebruary 19, 2025 15:54
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsFeb 19, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aslilacaslilacaslilac approved these changes

Assignees

@brettkolodnybrettkolodny

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@brettkolodny@aslilac

[8]ページ先頭

©2009-2025 Movatter.jp