diff --git a/README.md b/README.md index 1b1f2c3..f21ac2f 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ And that's it! Your `SkateHub Frontend` should now be up and running locally on ### 2024 +- 2024-04-28 - Update the `forgot-password` page of the SkateHub project [#20](https://github.com/jpcmf/Frontend-GraduateProgram-FullStack-2024/pull/20) _(v0.1.16)_ - 2024-04-28 - Redirect to the root route when attempting to access /auth [#19](https://github.com/jpcmf/Frontend-GraduateProgram-FullStack-2024/pull/19) _(v0.1.15)_ - 2024-04-28 - Create the `forgot-password` page of the SkateHub project [#18](https://github.com/jpcmf/Frontend-GraduateProgram-FullStack-2024/pull/18) _(v0.1.14)_ - 2024-04-11 - Update the `signin` page of the SkateHub project [#17](https://github.com/jpcmf/Frontend-GraduateProgram-FullStack-2024/pull/17) _(v0.1.13)_ diff --git a/package.json b/package.json index 84a0444..c167c2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.1.15", + "version": "0.1.16", "private": true, "scripts": { "dev": "next dev", diff --git a/src/pages/auth/forgot-password.tsx b/src/pages/auth/forgot-password.tsx index cd25fd4..825938f 100644 --- a/src/pages/auth/forgot-password.tsx +++ b/src/pages/auth/forgot-password.tsx @@ -23,6 +23,7 @@ export default function ForgotPassword() { const { handleSubmit, register, + resetField, formState: { errors, isSubmitting } } = useForm({ resolver: zodResolver(forgotPasswordFormSchema), @@ -39,6 +40,8 @@ export default function ForgotPassword() { body: JSON.stringify(values) }); + resetField("email"); + addToast({ title: "E-mail enviado com sucesso.", message: @@ -46,7 +49,9 @@ export default function ForgotPassword() { type: "success" }); - route.push("/auth/signin"); + setTimeout(() => { + route.push("/auth/signin"); + }, 5000); } catch (error) { addToast({ title: "Erro ao processar solicitação.",