fix: 인증번호 입력 시 다음 비밀번호에 인증번호가 남는 오류 수정

This commit is contained in:
정기영 2024-08-14 10:21:34 +09:00
parent c32c11ee70
commit c42eb5a787

View File

@ -5,7 +5,6 @@ import styles from './PasswordResetAuthPage.module.css';
import { usePasswordReset } from '../../hooks/api/usePasswordReset'; import { usePasswordReset } from '../../hooks/api/usePasswordReset';
export default function PasswordResetPage() { export default function PasswordResetPage() {
// TODO:
const location = useLocation(); const location = useLocation();
const email = location.state; const email = location.state;
const navigate = useNavigate(); const navigate = useNavigate();
@ -23,6 +22,7 @@ export default function PasswordResetPage() {
setAuthError(false); setAuthError(false);
verify(authNumRef.current.value, email) verify(authNumRef.current.value, email)
.then(() => { .then(() => {
authNumRef.current.value = '';
setSentAuthNum(true); setSentAuthNum(true);
}) })
.catch((err) => { .catch((err) => {