43 lines
1.3 KiB
JavaScript
43 lines
1.3 KiB
JavaScript
"use client";
|
|
|
|
import { usePathname } from "next/navigation";
|
|
import Link from "next/link";
|
|
import Image from "next/image";
|
|
import slogan from "@/public/images/slogan.png";
|
|
|
|
export default function LoginLayout({ children }) {
|
|
const pathname = usePathname();
|
|
return (
|
|
<section className="flex flex-1 flex-col items-center">
|
|
<Image src={slogan} priority alt="" className="mt-24 w-96" />
|
|
<div className="flex mt-4 h-10 justify-center">
|
|
<div className="tabs tab-boxed w-72">
|
|
<Link
|
|
className={`tab basis-1/2 ${
|
|
pathname === "/auth/login/phonenumlogin"
|
|
? "tab-active text-[#FF669E] bg-[#FF61B030] rounded-full"
|
|
: "text-[#FFFFFF80]"
|
|
}`}
|
|
href="phonenumlogin"
|
|
replace
|
|
>
|
|
手机号登录
|
|
</Link>
|
|
<Link
|
|
className={`tab basis-1/2 ${
|
|
pathname === "/auth/login/passwordlogin"
|
|
? "tab-active text-[#FF669E] bg-[#FF61B030] rounded-full"
|
|
: "text-[#FFFFFF80]"
|
|
}`}
|
|
href="passwordlogin"
|
|
replace
|
|
>
|
|
账号密码登录
|
|
</Link>
|
|
</div>
|
|
</div>
|
|
<div className="flex">{children}</div>
|
|
</section>
|
|
);
|
|
}
|