chore(frontend): 개발 서버에서 로그인 폼 기본 계정 채움
.env.development 의 VITE_DEFAULT_LOGIN_* 로만 채워지고 빌드·테스트엔 안 들어감. 라벨 '비번' → '비밀번호'. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import { useLogin } from "../hooks/useLogin"
|
||||
import { safeRedirectPath } from "../utils/safeRedirectPath"
|
||||
import { ApiError } from "@/lib/api/errors"
|
||||
import type { LoginRequest } from "@/types/api"
|
||||
import { env } from "@/config/env"
|
||||
|
||||
export default function LoginForm() {
|
||||
const {
|
||||
@@ -19,7 +20,8 @@ export default function LoginForm() {
|
||||
formState: { errors },
|
||||
} = useForm<LoginInput>({
|
||||
resolver: zodResolver(loginSchema),
|
||||
defaultValues: { email: "", password: "" },
|
||||
// 개발 서버에선 .env.development 의 기본 계정이 채워져 있어 버튼만 누르면 됨
|
||||
defaultValues: { email: env.defaultLoginEmail, password: env.defaultLoginPassword },
|
||||
})
|
||||
const login = useLogin()
|
||||
const navigate = useNavigate()
|
||||
@@ -53,7 +55,7 @@ export default function LoginForm() {
|
||||
{errors.email && <p className="text-destructive text-sm">{errors.email.message}</p>}
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="password">비번</Label>
|
||||
<Label htmlFor="password">비밀번호</Label>
|
||||
<Input
|
||||
id="password"
|
||||
type="password"
|
||||
|
||||
Reference in New Issue
Block a user