update
This commit is contained in:
parent
442fad9c98
commit
e8e9632512
@ -18,6 +18,8 @@ export default function Sidebar({ children }: { children?: React.ReactNode }) {
|
||||
setOpenSubmenu(prev => (prev === menu ? null : menu))
|
||||
}
|
||||
|
||||
const isActive = (path: string) => pathname === path
|
||||
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
@ -44,7 +46,6 @@ export default function Sidebar({ children }: { children?: React.ReactNode }) {
|
||||
|
||||
<nav className="flex-1 overflow-y-auto px-2">
|
||||
<ul className="space-y-1">
|
||||
|
||||
{/* Dashboard */}
|
||||
<li>
|
||||
<Button
|
||||
@ -52,7 +53,7 @@ export default function Sidebar({ children }: { children?: React.ReactNode }) {
|
||||
size="sm"
|
||||
variant="link"
|
||||
className={`w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm rounded-lg transition-colors ${
|
||||
pathname === '/dashboard'
|
||||
isActive('/dashboard')
|
||||
? 'bg-gray-100 dark:bg-neutral-700 text-gray-900 dark:text-white'
|
||||
: 'text-gray-800 hover:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700'
|
||||
}`}
|
||||
@ -71,8 +72,8 @@ export default function Sidebar({ children }: { children?: React.ReactNode }) {
|
||||
className="w-full flex items-center justify-between gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-100 dark:text-neutral-200 dark:hover:bg-neutral-700"
|
||||
>
|
||||
<span className="flex items-center gap-x-3.5">
|
||||
<svg className="size-5" viewBox="0 0 640 640" fill="currentColor" stroke="currentColor" strokeWidth="2">
|
||||
<path d="M320 64C355.3 64 384 92.7 384 128C384 163.3 355.3 192 320 192C284.7 192 256 163.3 256 128C256 92.7 284.7 64 320 64zM416 376C416 401 403.3 423 384 435.9L384 528C384 554.5 362.5 576 336 576L304 576C277.5 576 256 554.5 256 528L256 435.9C236.7 423 224 401 224 376L224 336C224 283 267 240 320 240C373 240 416 283 416 336L416 376zM160 96C190.9 96 216 121.1 216 152C216 182.9 190.9 208 160 208C129.1 208 104 182.9 104 152C104 121.1 129.1 96 160 96zM176 336L176 368C176 400.5 188.1 430.1 208 452.7L208 528C208 529.2 208 530.5 208.1 531.7C199.6 539.3 188.4 544 176 544L144 544C117.5 544 96 522.5 96 496L96 439.4C76.9 428.4 64 407.7 64 384L64 352C64 299 107 256 160 256C172.7 256 184.8 258.5 195.9 262.9C183.3 284.3 176 309.3 176 336zM432 528L432 452.7C451.9 430.2 464 400.5 464 368L464 336C464 309.3 456.7 284.4 444.1 262.9C455.2 258.4 467.3 256 480 256C533 256 576 299 576 352L576 384C576 407.7 563.1 428.4 544 439.4L544 496C544 522.5 522.5 544 496 544L464 544C451.7 544 440.4 539.4 431.9 531.7C431.9 530.5 432 529.2 432 528zM480 96C510.9 96 536 121.1 536 152C536 182.9 510.9 208 480 208C449.1 208 424 182.9 424 152C424 121.1 449.1 96 480 96z" />
|
||||
<svg className="size-5" viewBox="0 0 640 640" fill="currentColor">
|
||||
<path d="M320 64C355.3 64 384 92.7 384 128C384 163.3 355.3 192 320 192C284.7 192 256 163.3 256 128C256 92.7 284.7 64 320 64zM416 376C416 401 403.3 423 384 435.9V528C384 554.5 362.5 576 336 576H304C277.5 576 256 554.5 256 528V435.9C236.7 423 224 401 224 376V336C224 283 267 240 320 240C373 240 416 283 416 336V376zM160 96C190.9 96 216 121.1 216 152C216 182.9 190.9 208 160 208C129.1 208 104 182.9 104 152C104 121.1 129.1 96 160 96zM176 336V368C176 400.5 188.1 430.1 208 452.7V528C208 529.2 208 530.5 208.1 531.7C199.6 539.3 188.4 544 176 544H144C117.5 544 96 522.5 96 496V439.4C76.9 428.4 64 407.7 64 384V352C64 299 107 256 160 256C172.7 256 184.8 258.5 195.9 262.9C183.3 284.3 176 309.3 176 336zM432 528V452.7C451.9 430.2 464 400.5 464 368V336C464 309.3 456.7 284.4 444.1 262.9C455.2 258.4 467.3 256 480 256C533 256 576 299 576 352V384C576 407.7 563.1 428.4 544 439.4V496C544 522.5 522.5 544 496 544H464C451.7 544 440.4 539.4 431.9 531.7C431.9 530.5 432 529.2 432 528zM480 96C510.9 96 536 121.1 536 152C536 182.9 510.9 208 480 208C449.1 208 424 182.9 424 152C424 121.1 449.1 96 480 96z" />
|
||||
</svg>
|
||||
Teams
|
||||
</span>
|
||||
@ -143,7 +144,7 @@ export default function Sidebar({ children }: { children?: React.ReactNode }) {
|
||||
size="sm"
|
||||
variant="link"
|
||||
className={`w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm rounded-lg transition-colors ${
|
||||
pathname === '/schedule'
|
||||
isActive('/schedule')
|
||||
? 'bg-gray-100 dark:bg-neutral-700 text-gray-900 dark:text-white'
|
||||
: 'text-gray-800 hover:bg-gray-100 dark:text-neutral-300 dark:hover:bg-neutral-700'
|
||||
}`}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user