Bpistle/src/components/Sidebar/HomeButton.tsx
2025-10-20 10:00:18 +08:00

18 lines
460 B
TypeScript

import { usePrimaryPage } from '@/PageManager'
import { Home } from 'lucide-react'
import SidebarItem from './SidebarItem'
export default function HomeButton({ collapse }: { collapse: boolean }) {
const { navigate, current, display } = usePrimaryPage()
return (
<SidebarItem
title="Home"
onClick={() => navigate('home')}
active={display && current === 'home'}
collapse={collapse}
>
<Home />
</SidebarItem>
)
}