active path sidebar

This commit is contained in:
marshennikovaolga
2024-09-06 13:07:41 +03:00
parent 2551a49f95
commit 3014116b56
4 changed files with 44 additions and 20 deletions

View File

@@ -109,6 +109,7 @@ const LogoAndSearch: React.FC = React.memo(() => {
LogoAndSearch.displayName = "LogoAndSearch"
const SidebarContent: React.FC = React.memo(() => {
const pathname = usePathname()
return (
<>
<nav className="bg-background relative flex h-full w-full shrink-0 flex-col">
@@ -117,9 +118,9 @@ const SidebarContent: React.FC = React.memo(() => {
</div>
<div tabIndex={-1} className="relative mb-0.5 mt-1.5 flex grow flex-col overflow-y-auto rounded-md px-3">
<div className="h-2 shrink-0" />
<LinkSection />
<PageSection />
<TopicSection />
<LinkSection pathname={pathname} />
<PageSection pathname={pathname} />
<TopicSection pathname={pathname} />
</div>
</nav>
<ProfileSection />