37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
|
import LoginState from "@/app/_ui/LoginState";
|
||
|
import SiderNav from "../../_ui/SiderNav";
|
||
|
import { faMagnet } 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: '链接管理',
|
||
|
icon: <FontAwesomeIcon icon={faMagnet} className=" fa-fw"></FontAwesomeIcon>,
|
||
|
id: 'add',
|
||
|
href: '/admin'
|
||
|
}
|
||
|
]}></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>
|
||
|
|
||
|
);
|
||
|
}
|