import { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useAuthStore } from '@/stores/auth'; export function LoginPage() { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(''); const [isLoading, setIsLoading] = useState(false); const navigate = useNavigate(); const { login } = useAuthStore(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(''); setIsLoading(true); try { await login(email, password); navigate('/inbox'); } catch (err) { setError(err instanceof Error ? err.message : 'Login failed'); } finally { setIsLoading(false); } }; return (
Sign in to your account
This app is invite-only. Contact an admin for access.