From 17e27fca707ff458954500d1bccf606d1a6b5055 Mon Sep 17 00:00:00 2001 From: Hyang-Dan Date: Tue, 2 Dec 2025 22:39:31 +0900 Subject: [PATCH] =?UTF-8?q?issue=20#36=20-=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EA=B5=AC=ED=98=84=20=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../page/account/resetPassword/ResetPasswordPage.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/ui/page/account/resetPassword/ResetPasswordPage.tsx b/src/ui/page/account/resetPassword/ResetPasswordPage.tsx index 13930ca..804dae5 100644 --- a/src/ui/page/account/resetPassword/ResetPasswordPage.tsx +++ b/src/ui/page/account/resetPassword/ResetPasswordPage.tsx @@ -19,7 +19,7 @@ import { Label } from '@/components/ui/label'; const steps = [1, 2, 3, 4]; export default function ResetPasswordPage() { - const [currentStep, setCurrentStep] = useState(4); + const [currentStep, setCurrentStep] = useState(1); const [showPassword, setShowPassword] = useState(false); const [showPasswordConfirm, setShowPasswordConfirm] = useState(false); const [isLoading, setIsLoading] = useState(false); @@ -87,11 +87,8 @@ export default function ResetPasswordPage() { const handleSecondStepOTPCompleted = async () => { if (isLoading) return; - if (!Validator.validatePasswordFormat(code)) { - resetPasswordForm.setError('code', { - type: 'pattern', - message: '올바른 코드 형식이 아닙니다.' - }); + const codeValid = await resetPasswordForm.trigger('code'); + if (!codeValid) { return; } @@ -105,7 +102,7 @@ export default function ResetPasswordPage() { try { const response = await accountNetwork.verifyResetPasswordCode(data); const resData = response.data; - + console.log(resData); if (!resData.success || !resData.verified) { resetPasswordForm.setError('code', { type: 'value',