import React, { useState } from 'react'; import { useAuth } from '../contexts/AuthContext'; import { MessageSquare } from 'lucide-react'; import { useTranslation } from 'react-i18next'; const LoginForm = () => { const { t } = useTranslation('auth'); const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(''); const { login } = useAuth(); const handleSubmit = async (e) => { e.preventDefault(); setError(''); if (!username || !password) { setError(t('errors.requiredFields')); return; } setIsLoading(true); const result = await login(username, password); if (!result.success) { setError(result.error); } setIsLoading(false); }; return (
{t('login.description')}
Enter your credentials to access Claude Code UI