import React, { useState } from 'react'; import { AlertCircle, Lock, User } from 'lucide-react'; import { useAuth } from '../contexts/AuthContext'; export default function LoginForm() { const [username, setUsername] = useState(''); const [password, setPassword] = useState(''); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const { login } = useAuth(); const handleSubmit = async (e) => { e.preventDefault(); setError(''); setLoading(true); const result = await login(username, password); if (!result.success) { setError(result.error); } setLoading(false); }; return (
Threat Intelligence Access Portal
{error}
Default: admin / admin123