mirror of
https://github.com/get-drexa/drive.git
synced 2025-12-01 05:51: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>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton
|
<SidebarMenuButton
|
||||||
asChild
|
asChild
|
||||||
isActive={location.pathname.startsWith(
|
isActive={location.pathname.startsWith("/directories")}
|
||||||
`/directories/${rootDirectory._id}`,
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<Link to={`/directories/${rootDirectory._id}`}>
|
<Link to={`/directories/${rootDirectory._id}`}>
|
||||||
<FilesIcon />
|
<FilesIcon />
|
||||||
@@ -101,9 +99,7 @@ function TrashItem() {
|
|||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<SidebarMenuButton
|
<SidebarMenuButton
|
||||||
asChild
|
asChild
|
||||||
isActive={location.pathname.startsWith(
|
isActive={location.pathname.startsWith("/trash/directories")}
|
||||||
`/trash/directories/${rootDirectory._id}`,
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<Link to={`/trash/directories/${rootDirectory._id}`}>
|
<Link to={`/trash/directories/${rootDirectory._id}`}>
|
||||||
<TrashIcon />
|
<TrashIcon />
|
||||||
|
|||||||
Reference in New Issue
Block a user