55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
import LoginState from "@/app/_ui/LoginState";
|
|
import SiderNav from "../../_ui/SiderNav";
|
|
import { faAd, faArrowAltCircleLeft, faMagnet, faPenClip } from "@fortawesome/free-solid-svg-icons"
|
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
|
|
|
export default function Layout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
|
|
return (
|
|
<div className="flex flex-col">
|
|
<SiderNav
|
|
|
|
linkList={[
|
|
{
|
|
label: '链接管理',
|
|
iconElement: <FontAwesomeIcon icon={faMagnet} className=" fa-fw"></FontAwesomeIcon>,
|
|
_id: 'addLink',
|
|
href: '/admin/dashboard'
|
|
},
|
|
{
|
|
label: '广告管理',
|
|
iconElement: <FontAwesomeIcon icon={faAd}></FontAwesomeIcon>,
|
|
_id: 'adMenagement',
|
|
href: '/admin/dashboard/ad'
|
|
|
|
},
|
|
{
|
|
label: '文章管理',
|
|
iconElement: <FontAwesomeIcon icon={faPenClip}></FontAwesomeIcon>,
|
|
_id: 'articleMenagement',
|
|
href: '/admin/dashboard/article'
|
|
|
|
},
|
|
|
|
]}></SiderNav>
|
|
<div>
|
|
<div className="h-[50px] bg-white/80 shadow flex items-center justify-between px-5 ">
|
|
<span className="font-bold text-xl">后台管理面板</span>
|
|
|
|
<LoginState></LoginState>
|
|
</div>
|
|
<main className="p-2">
|
|
|
|
{children}
|
|
</main>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
);
|
|
}
|