- 화면 구현 완료
This commit is contained in:
2025-12-02 22:39:31 +09:00
parent af3fa26f3b
commit 17e27fca70

View File

@@ -19,7 +19,7 @@ import { Label } from '@/components/ui/label';
const steps = [1, 2, 3, 4]; const steps = [1, 2, 3, 4];
export default function ResetPasswordPage() { export default function ResetPasswordPage() {
const [currentStep, setCurrentStep] = useState(4); const [currentStep, setCurrentStep] = useState(1);
const [showPassword, setShowPassword] = useState(false); const [showPassword, setShowPassword] = useState(false);
const [showPasswordConfirm, setShowPasswordConfirm] = useState(false); const [showPasswordConfirm, setShowPasswordConfirm] = useState(false);
const [isLoading, setIsLoading] = useState(false); const [isLoading, setIsLoading] = useState(false);
@@ -87,11 +87,8 @@ export default function ResetPasswordPage() {
const handleSecondStepOTPCompleted = async () => { const handleSecondStepOTPCompleted = async () => {
if (isLoading) return; if (isLoading) return;
if (!Validator.validatePasswordFormat(code)) { const codeValid = await resetPasswordForm.trigger('code');
resetPasswordForm.setError('code', { if (!codeValid) {
type: 'pattern',
message: '올바른 코드 형식이 아닙니다.'
});
return; return;
} }
@@ -105,7 +102,7 @@ export default function ResetPasswordPage() {
try { try {
const response = await accountNetwork.verifyResetPasswordCode(data); const response = await accountNetwork.verifyResetPasswordCode(data);
const resData = response.data; const resData = response.data;
console.log(resData);
if (!resData.success || !resData.verified) { if (!resData.success || !resData.verified) {
resetPasswordForm.setError('code', { resetPasswordForm.setError('code', {
type: 'value', type: 'value',