mirror of
https://github.com/get-drexa/drive.git
synced 2025-11-30 21:41:39 +00:00
fix: sidebar items not highlighted in non-root dir
fix all files and trash items not highlighed when navigated into non-root dirs
This commit is contained in:
@@ -78,9 +78,7 @@ function AllFilesItem() {
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
isActive={location.pathname.startsWith(
|
||||
`/directories/${rootDirectory._id}`,
|
||||
)}
|
||||
isActive={location.pathname.startsWith("/directories")}
|
||||
>
|
||||
<Link to={`/directories/${rootDirectory._id}`}>
|
||||
<FilesIcon />
|
||||
@@ -101,9 +99,7 @@ function TrashItem() {
|
||||
<SidebarMenuItem>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
isActive={location.pathname.startsWith(
|
||||
`/trash/directories/${rootDirectory._id}`,
|
||||
)}
|
||||
isActive={location.pathname.startsWith("/trash/directories")}
|
||||
>
|
||||
<Link to={`/trash/directories/${rootDirectory._id}`}>
|
||||
<TrashIcon />
|
||||
|
||||
Reference in New Issue
Block a user