fix: add end prop to all NavLinks to prevent prefix-matching activation
This commit is contained in:
@@ -156,6 +156,7 @@ export function Sidebar() {
|
|||||||
<li key={item.path}>
|
<li key={item.path}>
|
||||||
<NavLink
|
<NavLink
|
||||||
to={item.path}
|
to={item.path}
|
||||||
|
end
|
||||||
className={({ isActive }) =>
|
className={({ isActive }) =>
|
||||||
clsx(
|
clsx(
|
||||||
'flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-medium min-h-touch',
|
'flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-medium min-h-touch',
|
||||||
@@ -205,6 +206,7 @@ export function Sidebar() {
|
|||||||
<li key={child.path}>
|
<li key={child.path}>
|
||||||
<NavLink
|
<NavLink
|
||||||
to={child.path}
|
to={child.path}
|
||||||
|
end
|
||||||
className={({ isActive }) =>
|
className={({ isActive }) =>
|
||||||
clsx(
|
clsx(
|
||||||
'flex items-center gap-2 px-3 py-2 rounded-md text-sm min-h-touch',
|
'flex items-center gap-2 px-3 py-2 rounded-md text-sm min-h-touch',
|
||||||
@@ -232,6 +234,7 @@ export function Sidebar() {
|
|||||||
<li key={item.to}>
|
<li key={item.to}>
|
||||||
<NavLink
|
<NavLink
|
||||||
to={item.to}
|
to={item.to}
|
||||||
|
end
|
||||||
className={({ isActive }) =>
|
className={({ isActive }) =>
|
||||||
clsx(
|
clsx(
|
||||||
'flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-medium min-h-touch',
|
'flex items-center gap-3 px-3 py-2.5 rounded-md text-sm font-medium min-h-touch',
|
||||||
|
|||||||
Reference in New Issue
Block a user