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

Currently selected route gets highlighted based on inexact match #35

Open
matthewpereira opened this issue Jul 22, 2024 · 0 comments
Open
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@matthewpereira
Copy link
Contributor

Expected behavior

The navigation route for the current view is highlighted with a 'dot' () element in the settings sidebar navigation.

Actual behavior

If you have a second route that simply extends another href (ie /my-page and /my-page-2, the “current selected dot” will show on both menu items in the sidebarnav, because the check is an “includes” check.

  {pathname.includes(item.href) && <Dot className="h-6 w-6" />}
@matthewpereira matthewpereira added bug Something isn't working good first issue Good for newcomers labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant