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

Sidebar optimizations #319

Closed
js0mmer opened this issue May 28, 2023 · 1 comment · Fixed by #421
Closed

Sidebar optimizations #319

js0mmer opened this issue May 28, 2023 · 1 comment · Fixed by #421
Assignees
Labels
Story Point: 2 small UI change, maybe some CSS + JS. unit test would ideally be written, but not always.

Comments

@js0mmer
Copy link
Member

js0mmer commented May 28, 2023

Currently, the useEffect hook in the sidebar that sets the name, picture, and requests if the user is admin is called on every render since there is no dependency array. We can optimize it by adding a dependency array so it only runs when the user logs in/logs out. Also the admin check only needs to be done if the user is logged in

@js0mmer js0mmer added the Story Point: 2 small UI change, maybe some CSS + JS. unit test would ideally be written, but not always. label May 28, 2023
@js0mmer js0mmer self-assigned this May 28, 2023
@js0mmer js0mmer moved this to In Progress in PeterPortal Client May 28, 2023
@js0mmer
Copy link
Member Author

js0mmer commented Feb 15, 2024

Fixed by #421

@js0mmer js0mmer closed this as completed Feb 15, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in PeterPortal Client Feb 15, 2024
@js0mmer js0mmer linked a pull request Feb 15, 2024 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Story Point: 2 small UI change, maybe some CSS + JS. unit test would ideally be written, but not always.
Projects
Development

Successfully merging a pull request may close this issue.

1 participant