mirror of
https://github.com/linsa-io/linsa.git
synced 2026-04-25 09:48:44 +02:00
active path sidebar
This commit is contained in:
@@ -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 />
|
||||
|
||||
Reference in New Issue
Block a user