|
|
|
|
@ -12,6 +12,7 @@ export const useChangePasswordForm = () => { |
|
|
|
|
const [isFetching, setIsFetching] = useState(false) |
|
|
|
|
const [password, setPassword] = useState('') |
|
|
|
|
const [confirmPassword, setConfirmPassword] = useState('') |
|
|
|
|
const [disabled, setDisabled] = useState(true) |
|
|
|
|
|
|
|
|
|
const { |
|
|
|
|
checkPassword, |
|
|
|
|
@ -39,6 +40,7 @@ export const useChangePasswordForm = () => { |
|
|
|
|
if (!checkPassword(value)) { |
|
|
|
|
setError('check_password') |
|
|
|
|
} else { |
|
|
|
|
setDisabled(false) |
|
|
|
|
setError('') |
|
|
|
|
} |
|
|
|
|
setPassword(value) |
|
|
|
|
@ -66,6 +68,7 @@ export const useChangePasswordForm = () => { |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
confirmPassword, |
|
|
|
|
disabled, |
|
|
|
|
error, |
|
|
|
|
handleSubmit, |
|
|
|
|
isFetching, |
|
|
|
|
|