mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 00:32:43 +10:00
feat: send email to user on successful password reset
This commit is contained in:
@ -5,6 +5,7 @@ import backgroundPattern from '~/assets/background-pattern.png';
|
||||
import { ForgotPasswordForm } from '~/components/forms/forgot-password';
|
||||
|
||||
export default function ForgotPasswordPage() {
|
||||
// TODO: Fix width reducing with screen size
|
||||
return (
|
||||
<main className="bg-sand-100 relative flex min-h-screen flex-col items-center justify-center overflow-hidden px-4 py-12 md:p-12 lg:p-24">
|
||||
<div className="relative flex w-1/5 items-center gap-x-24">
|
||||
|
||||
@ -43,10 +43,7 @@ export const ForgotPasswordForm = ({ className }: ForgotPasswordFormProps) => {
|
||||
const { mutateAsync: forgotPassword } = trpc.profile.forgotPassword.useMutation();
|
||||
|
||||
const onFormSubmit = async ({ email }: TForgotPasswordFormSchema) => {
|
||||
// check if the email is available
|
||||
// if not, throw an error
|
||||
// if the email is available, create a password reset token and send an email
|
||||
|
||||
// TODO: Handle error with try/catch
|
||||
await forgotPassword({
|
||||
email,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user