Skip to content

Commit

Permalink
Password reset complete
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisParedes1 committed Nov 30, 2023
1 parent 3e171f0 commit 95a0aac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/screens/login/firebase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ const registerWithEmailAndPassword = async (
const sendPasswordReset = async (email: string) => {
try {
await sendPasswordResetEmail(auth, email);
console.error('Password reset link sent!');
} catch (err) {
console.error(err);
}
Expand Down
8 changes: 6 additions & 2 deletions src/screens/login/recover-password-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ import { useState } from 'react';
import * as z from 'zod';
import { SubmitHandler, useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { sendPasswordReset } from './firebase';

const onResetSubmit: ResetFormProps['onResetSubmit'] = (data) => {
console.log('Entre aca');
console.log(data);
try {
sendPasswordReset(data.email).then(() => {});
} catch (err) {
console.error(err);
}
};

const schema = z.object({
Expand Down

0 comments on commit 95a0aac

Please sign in to comment.