-
Notifications
You must be signed in to change notification settings - Fork 529
fix(navbar): highlighting on browser back #2425
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
Changes from all commits
e1ba104
902cafb
92f547f
2d53208
9475539
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ const NavLink = ({ | |
| const href = `#${to}` | ||
| const active = alternative | ||
| ? hash === href || hash.startsWith(`${href}${alternative}`) | ||
| : hash && hash.startsWith(href) | ||
| : hash === href || hash.startsWith(`${href}/`) | ||
| const anchorClass = classnames({ | ||
| 'bg-white-10 navbar-item-active': active, | ||
| 'o-50 no-pointer-events': disabled | ||
|
|
@@ -46,7 +46,7 @@ const NavLink = ({ | |
|
|
||
| return ( | ||
| // eslint-disable-next-line jsx-a11y/anchor-is-valid | ||
| <a href={disabled ? undefined : href} className={anchorClass} role='menuitem' title={children}> | ||
| <a href={disabled ? undefined : href} onClick={(e) => e.currentTarget.blur()} className={anchorClass} role='menuitem' title={children}> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: in the future explain why things like this are added for example:
|
||
| <div className='db ph2 pv1'> | ||
| <div className='db'> | ||
| <Svg width='46' role='presentation' className={svgClass} /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SuchitraSwain nit: in the future please try to avoid unrelated changes like this, they make reviews harder