import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { useAuth } from '../contexts/AuthContext'; const LoginNew: React.FC = () => { const [email, setEmail] = useState(''); const [isLoading, setIsLoading] = useState(false); const { login } = useAuth(); const navigate = useNavigate(); const handleLogin = async () => { if (!email) return; setIsLoading(true); try { await login(email); navigate('/company-wiki'); } catch (error) { console.error('Login failed:', error); } finally { setIsLoading(false); } }; return (
Welcome to Auditly
Sign in to your account to continue
Email Address
*
setEmail(e.target.value)} className="flex-1 bg-transparent text-Neutrals-NeutralSlate950 text-sm font-normal font-['Inter'] leading-tight placeholder:text-Neutrals-NeutralSlate500 outline-none" placeholder="Enter your email address" onKeyPress={(e) => e.key === 'Enter' && handleLogin()} />
Don't have an account? Contact your administrator.
); }; export default LoginNew;