import { useState } from 'react'; import { Link } from 'react-router-dom'; import { useAuth } from '../hooks/useAuth'; export default function Login() { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const { login: handleLogin } = useAuth(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); try { await handleLogin(email, password); } catch (err) { // Error is handled by the hook (toast shown) } }; return (
Don't have an account? Register