Skip to content

Commit

Permalink
chore: remove old type from login page
Browse files Browse the repository at this point in the history
  • Loading branch information
vimalsonara committed Jan 6, 2024
1 parent 938da61 commit a5e975f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
"use client";
import { useForm, SubmitHandler } from "react-hook-form";
import { useRouter } from "next/navigation";
import { signIn } from "next-auth/react";
import { LoginTypes } from "@/app/api/auth/[...nextauth]/route";

type Inputs = {
email: string
password: string
}

export default function Login() {
const router = useRouter();

const {
register,
handleSubmit,
formState: { errors },
} = useForm<LoginTypes>();
const onSubmit: SubmitHandler<LoginTypes> = async (data) => {
} = useForm<Inputs>();
const onSubmit: SubmitHandler<Inputs> = async (data) => {
console.log(data);

await signIn("credentials", { ...data, redirect: true, callbackUrl: "/" });
Expand Down

0 comments on commit a5e975f

Please sign in to comment.