import React, { useState } from "react"; import { Link } from "react-router-dom"; import { useAuth } from "../../contexts/AuthContext"; import TextInput from "../common/inputs/TextInput"; import { Button } from "../common/ui/button"; import { ROUTES } from "../../lib/constants"; const Login = () => { const { login } = useAuth(); const [formData, setFormData] = useState({ username: "", password: "", }); const handleChange = (e) => { const { name, value } = e.target; setFormData((prev) => ({ ...prev, [name]: value, })); }; const handleSubmit = async (event) => { event.preventDefault(); await login(formData); }; return (

Welcome back!

Need to register?{" "} Create an account

); }; export default Login;