feat(admin): 侧边栏加「返回主页」
- 整页跳转回用户端官网首页(生产同源,a href="/") Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import { Link, NavLink, useNavigate } from 'react-router-dom'
|
|||||||
import {
|
import {
|
||||||
BarChart3,
|
BarChart3,
|
||||||
FileText,
|
FileText,
|
||||||
|
Home,
|
||||||
LayoutDashboard,
|
LayoutDashboard,
|
||||||
LogOut,
|
LogOut,
|
||||||
Moon,
|
Moon,
|
||||||
@@ -86,6 +87,15 @@ export function AdminSidebar({ open, onClose }: Props) {
|
|||||||
{item.label}
|
{item.label}
|
||||||
</NavLink>
|
</NavLink>
|
||||||
))}
|
))}
|
||||||
|
{/* 整页跳转回用户端官网首页(生产同源) */}
|
||||||
|
<a
|
||||||
|
href="/"
|
||||||
|
onClick={onClose}
|
||||||
|
className="flex items-center gap-3 rounded-lg px-3 py-2.5 text-[14px] text-ink-2 transition-colors hover:bg-ground hover:text-ink"
|
||||||
|
>
|
||||||
|
<Home className="size-[18px]" />
|
||||||
|
返回主页
|
||||||
|
</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div className="space-y-1 border-t border-hairline p-3">
|
<div className="space-y-1 border-t border-hairline p-3">
|
||||||
|
|||||||
Reference in New Issue
Block a user