import { useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import { useAuth } from '../lib/auth'; export default function Login() { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(''); const [loading, setLoading] = useState(false); const { login } = useAuth(); const navigate = useNavigate(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(''); setLoading(true); try { await login(email, password); navigate('/'); } catch (err) { setError(err instanceof Error ? err.message : 'Login failed'); } finally { setLoading(false); } }; return (
{/* Subtle grid background */}
{/* Radial fade */}
{/* Brand */}

Sign in to Agent Fox

API documentation for LLMs

{/* Card */}
{error && (
{error}
)}
setEmail(e.target.value)} className="input-base" placeholder="you@example.com" required />
setPassword(e.target.value)} className="input-base" placeholder="Enter your password" required />

Don't have an account?{' '} Sign Up

); }