2023-03-10 16:35:47 +08:00
|
|
|
import SecondaryPageLayout from '@/Layout/SecondaryPageLayout';
|
2022-11-02 11:28:06 +08:00
|
|
|
import SetPassword from '@/containers/SetPassword';
|
2023-03-07 10:55:29 +08:00
|
|
|
import { passwordMinLength } from '@/utils/form';
|
2022-11-02 11:28:06 +08:00
|
|
|
|
|
|
|
import useResetPassword from './use-reset-password';
|
2022-09-20 10:16:28 +08:00
|
|
|
|
|
|
|
const ResetPassword = () => {
|
2022-11-02 11:28:06 +08:00
|
|
|
const { resetPassword, errorMessage, clearErrorMessage } = useResetPassword();
|
|
|
|
|
2022-09-20 10:16:28 +08:00
|
|
|
return (
|
2023-03-10 16:35:47 +08:00
|
|
|
<SecondaryPageLayout
|
2023-03-01 13:42:45 +08:00
|
|
|
title="description.new_password"
|
2023-03-07 10:55:29 +08:00
|
|
|
description="error.invalid_password"
|
|
|
|
descriptionProps={{ min: passwordMinLength }}
|
2023-03-01 13:42:45 +08:00
|
|
|
>
|
2022-11-02 11:28:06 +08:00
|
|
|
<SetPassword
|
|
|
|
autoFocus
|
|
|
|
errorMessage={errorMessage}
|
|
|
|
clearErrorMessage={clearErrorMessage}
|
|
|
|
onSubmit={resetPassword}
|
|
|
|
/>
|
2023-03-10 16:35:47 +08:00
|
|
|
</SecondaryPageLayout>
|
2022-09-20 10:16:28 +08:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default ResetPassword;
|