refactor: sidebar

This commit is contained in:
codytseng 2025-10-17 23:34:56 +08:00
parent 21663711f8
commit 057de9595b
13 changed files with 110 additions and 44 deletions

View file

@ -3,12 +3,12 @@ import { useSecondaryPage } from '@/PageManager'
import { Settings } from 'lucide-react'
import SidebarItem from './SidebarItem'
export default function SettingsButton() {
export default function SettingsButton({ collapse }: { collapse: boolean }) {
const { push } = useSecondaryPage()
return (
<SidebarItem title="Settings" onClick={() => push(toSettings())}>
<Settings strokeWidth={3} />
<SidebarItem title="Settings" onClick={() => push(toSettings())} collapse={collapse}>
<Settings />
</SidebarItem>
)
}