feat: implement logout functionality in admin navbar and update sidebar links

This commit is contained in:
Ardeman
2025-03-03 19:03:04 +08:00
parent 1bebe61634
commit 8f5f1bc552
3 changed files with 55 additions and 11 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import { NavLink, useLocation } from 'react-router'
import { Link, useLocation } from 'react-router'
import { twMerge } from 'tailwind-merge'
import { MENU } from './menu'
@@ -15,7 +15,7 @@ export const Sidebar = () => {
>
<div className="px-5 pb-4 text-[#4C5CA0]/50 uppercase">{group}</div>
{items.map(({ title, url, icon: Icon }) => (
<NavLink
<Link
to={url}
key={`${group}-${title}`}
className={twMerge(
@@ -37,7 +37,7 @@ export const Sidebar = () => {
>
{title}
</span>
</NavLink>
</Link>
))}
</div>
))}