fix: NavLink全部加end属性,修复父路径永远选中问题
This commit is contained in:
@@ -12,7 +12,7 @@ export function BottomTab() {
|
||||
<NavLink
|
||||
key={item.path}
|
||||
to={item.path}
|
||||
end={item.path === '/'}
|
||||
end
|
||||
className={({ isActive }) =>
|
||||
cn(
|
||||
'flex flex-1 flex-col items-center gap-0.5 py-1 text-xs transition-colors',
|
||||
|
||||
@@ -30,7 +30,7 @@ export function Sidebar() {
|
||||
<NavLink
|
||||
key={item.path}
|
||||
to={item.path}
|
||||
end={item.path === '/'}
|
||||
end
|
||||
className={({ isActive }) =>
|
||||
cn(
|
||||
'flex items-center gap-3 px-5 py-2 text-sm transition-colors',
|
||||
|
||||
Reference in New Issue
Block a user