import { useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import { useAuth } from '@/hooks/useAuth'; import { Eye, EyeOff, Shield } from 'lucide-react'; export default function Login() { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [showPassword, setShowPassword] = useState(false); const { login, loginLoading } = useAuth(); const navigate = useNavigate(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); try { await login({ email, password }); } catch (error) { // Error is handled by useAuth hook } }; return (
{/* Header */}

SaaS Platform

Sign in to manage your platform

{/* Login Form */}
{/* Email */}
setEmail(e.target.value)} className="mt-1 input-field" placeholder="Enter your email" />
{/* Password */}
setPassword(e.target.value)} className="input-field pr-10" placeholder="Enter your password" />
{/* Submit Button */}
{/* Demo Credentials */}

Demo Credentials:

Email: admin@example.com

Password: demo_password

{/* Footer */}

Don't have an account?{' '} Contact administrator

); }