import { redirect } from "next/navigation"; import { auth } from "@/auth"; import { Button } from "@/components/ui/button"; import { loginAction } from "./actions"; type LoginPageProps = { searchParams: Promise<{ callbackUrl?: string; error?: string; }>; }; export default async function LoginPage({ searchParams }: LoginPageProps) { const session = await auth(); if (session) { redirect("/"); } const params = await searchParams; const callbackUrl = params.callbackUrl ?? "/"; const hasError = params.error === "CredentialsSignin"; return (

chocoadmin

관리자 로그인

{hasError ? (
관리자 아이디 또는 암호가 올바르지 않습니다.
) : null}
); }