fix: update sidebar button active state logic
This commit is contained in:
parent
6090c01965
commit
09c05cc62a
6 changed files with 12 additions and 12 deletions
|
|
@ -3,13 +3,13 @@ import { Home } from 'lucide-react'
|
|||
import SidebarItem from './SidebarItem'
|
||||
|
||||
export default function HomeButton({ collapse }: { collapse: boolean }) {
|
||||
const { navigate, current } = usePrimaryPage()
|
||||
const { navigate, current, display } = usePrimaryPage()
|
||||
|
||||
return (
|
||||
<SidebarItem
|
||||
title="Home"
|
||||
onClick={() => navigate('home')}
|
||||
active={current === 'home'}
|
||||
active={display && current === 'home'}
|
||||
collapse={collapse}
|
||||
>
|
||||
<Home />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue