import { Link } from "react-router-dom" import "../styles/Login.css" import { FormEvent } from "react"; export default function Login() { function handleSubmit(e: FormEvent) { e.preventDefault(); const formData = new FormData(e.target as HTMLFormElement); const username = formData.get('username'); const password = formData.get('password'); fetch('http://localhost:8000/api/login/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ username, password }), }) .catch((error) => { console.error('Error:', error); }); } return (

Login

or Sign up

); }