import type { NextPage } from "next"; import type { FormEvent } from "react"; import { gql } from "@apollo/client"; import { client } from "../lib/client"; const Login: NextPage = () => { async function loginUser(event: FormEvent): Promise { event.preventDefault(); const input = { email: (event.target as HTMLFormElement).email.value, password: (event.target as HTMLFormElement).password.value, }; console.log(input); // client // .mutate({ // mutation: gql` // mutation Login($input: LoginInput!) { // login(input: $input) { // user { // id // firstname // lastname // email // } // bearer // } // } // `, // }) // .then((res) => { // console.log(res); // }); } return (

Login:





); }; export default Login;