0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-02-17 22:04:19 -05:00
logto/packages/ui/src/pages/ResetPassword/index.tsx

27 lines
736 B
TypeScript
Raw Normal View History

import SecondaryPageLayout from '@/Layout/SecondaryPageLayout';
import SetPassword from '@/containers/SetPassword';
import { passwordMinLength } from '@/utils/form';
import useResetPassword from './use-reset-password';
const ResetPassword = () => {
const { resetPassword, errorMessage, clearErrorMessage } = useResetPassword();
return (
<SecondaryPageLayout
title="description.new_password"
description="error.invalid_password"
descriptionProps={{ min: passwordMinLength }}
>
<SetPassword
autoFocus
errorMessage={errorMessage}
clearErrorMessage={clearErrorMessage}
onSubmit={resetPassword}
/>
</SecondaryPageLayout>
);
};
export default ResetPassword;