import { Link } from "react-router-dom"; import React, { useState, FormEventHandler } from "react"; interface login { id: string; password: string; } // const fake = { id: "asdf", password: "qwer" }; function Logindata() { const [id, setId] = useState(""); const [password, setPassword] = useState(""); function login() { fetch(`http://localhost:3000/api/auth/login`, { method: "POST", body: JSON.stringify({ email: `${id}`, password: `${password}`, }), }).then((response) => { console.log(response.json()); }); } return (
setId(e.target.value)} /> setPassword(e.target.value)} />
); } export default function Login() { return (
{/*
*/}
Travel Report
{/*
*/}
// Login Page ); }