Skip to content

Conversation

juliusv
Copy link
Member

@juliusv juliusv commented May 10, 2025

When opening the status pages menu while already viewing one of the status pages, the whole page would be re-rendered because the menu target's default action of following the current page's URL was not prevented. Also, we don't need to use a NavLink component for the menu target when we are not viewing a status page, because then the component won't need to be highlighted anyways.

Discovered + fixed with the help of react-scan.

When opening the status pages menu while already viewing one of the
status pages, the whole page would be re-rendered because the menu target's
default action of following the current page's URL was not prevented. Also,
we don't need to use a NavLink component for the menu target when we are
not viewing a status page, because then the component won't need to be
highlighted anyways.

Discovered + fixed with the help of react-scan.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
@juliusv juliusv requested a review from Nexucis May 10, 2025 12:32
@Nexucis Nexucis merged commit dbf5d01 into main May 12, 2025
45 checks passed
@Nexucis Nexucis deleted the optimize-status-menu branch May 12, 2025 10:17
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