import type { Metadata } from "next"; import { redirect } from "next/navigation"; import { getAdminSession, getUserSession } from "@/lib/session"; import { loginAction } from "./actions"; export const metadata: Metadata = { title: "鹅梯 FeieProxy", }; export default async function LoginPage({ searchParams, }: { searchParams: Promise<{ error?: string }>; }) { const [adminSession, userSession] = await Promise.all([ getAdminSession(), getUserSession(), ]); if (adminSession) { redirect("/admin/dashboard"); } if (userSession) { redirect("/me"); } const params = await searchParams; return (
安全登录

鹅梯 FeieProxy

家宽节点
{params.error ? (

用户名或密码错误。

) : null}
); }