Skip to content

Instantly share code, notes, and snippets.

View arthu's full-sized avatar
💭
I may be slow to respond.

arthur arthu

💭
I may be slow to respond.
View GitHub Profile
import { useForm } from 'react-hook-form';
import { useRouter } from 'next/router';
import { useAuth } from 'hooks/useAuth';
const ResetPasswordForm: React.FC = () => {
const { register, errors, handleSubmit } = useForm();
const auth = useAuth();
const router = useRouter();
const onSubmit = (data: { email: string }) => {
auth.sendPasswordResetEmail(data.email);
router.push('/login');