Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)_
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "0.1.15",
"version": "0.1.16",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down
7 changes: 6 additions & 1 deletion src/pages/auth/forgot-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default function ForgotPassword() {
const {
handleSubmit,
register,
resetField,
formState: { errors, isSubmitting }
} = useForm<ForgotPasswordFormSchema>({
resolver: zodResolver(forgotPasswordFormSchema),
Expand All @@ -39,14 +40,18 @@ export default function ForgotPassword() {
body: JSON.stringify(values)
});

resetField("email");

addToast({
title: "E-mail enviado com sucesso.",
message:
"Verifique sua caixa de entrada para instruções sobre como recuperar sua senha. Ao clicar no link fornecido, você poderá definir uma nova senha.",
type: "success"
});

route.push("/auth/signin");
setTimeout(() => {
route.push("/auth/signin");
}, 5000);
} catch (error) {
addToast({
title: "Erro ao processar solicitação.",
Expand Down