refactor: sidebar
This commit is contained in:
parent
21663711f8
commit
057de9595b
13 changed files with 110 additions and 44 deletions
|
|
@ -2,12 +2,17 @@ import { usePrimaryPage } from '@/PageManager'
|
|||
import { Home } from 'lucide-react'
|
||||
import SidebarItem from './SidebarItem'
|
||||
|
||||
export default function HomeButton() {
|
||||
export default function HomeButton({ collapse }: { collapse: boolean }) {
|
||||
const { navigate, current } = usePrimaryPage()
|
||||
|
||||
return (
|
||||
<SidebarItem title="Home" onClick={() => navigate('home')} active={current === 'home'}>
|
||||
<Home strokeWidth={3} />
|
||||
<SidebarItem
|
||||
title="Home"
|
||||
onClick={() => navigate('home')}
|
||||
active={current === 'home'}
|
||||
collapse={collapse}
|
||||
>
|
||||
<Home />
|
||||
</SidebarItem>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue