This commit is contained in:
m5r
2021-08-01 22:03:49 +08:00
parent 7d34fcd48f
commit 1489f97c14
33 changed files with 147 additions and 313 deletions

View File

@ -17,10 +17,7 @@ const ForgotPasswordPage: BlitzPage = () => {
{isSuccess ? (
<div>
<h2>Request Submitted</h2>
<p>
If your email is in our system, you will receive instructions to reset your
password shortly.
</p>
<p>If your email is in our system, you will receive instructions to reset your password shortly.</p>
</div>
) : (
<Form
@ -32,8 +29,7 @@ const ForgotPasswordPage: BlitzPage = () => {
await forgotPasswordMutation(values);
} catch (error) {
return {
[FORM_ERROR]:
"Sorry, we had an unexpected error. Please try again.",
[FORM_ERROR]: "Sorry, we had an unexpected error. Please try again.",
};
}
}}
@ -47,8 +43,6 @@ const ForgotPasswordPage: BlitzPage = () => {
ForgotPasswordPage.redirectAuthenticatedTo = Routes.Messages();
ForgotPasswordPage.getLayout = (page) => (
<BaseLayout title="Forgot Your Password?">{page}</BaseLayout>
);
ForgotPasswordPage.getLayout = (page) => <BaseLayout title="Forgot Your Password?">{page}</BaseLayout>;
export default ForgotPasswordPage;

View File

@ -41,19 +41,14 @@ const ResetPasswordPage: BlitzPage = () => {
};
} else {
return {
[FORM_ERROR]:
"Sorry, we had an unexpected error. Please try again.",
[FORM_ERROR]: "Sorry, we had an unexpected error. Please try again.",
};
}
}
}}
>
<LabeledTextField name="password" label="New Password" type="password" />
<LabeledTextField
name="passwordConfirmation"
label="Confirm New Password"
type="password"
/>
<LabeledTextField name="passwordConfirmation" label="Confirm New Password" type="password" />
</Form>
)}
</div>