import { useState } from 'react'; import { Link, useNavigate } from 'react-router-dom'; import { useAuth } from '@/contexts/AuthContext'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'; import { Cloud, Loader2 } from 'lucide-react'; export function Login() { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [isSubmitting, setIsSubmitting] = useState(false); const { login } = useAuth(); const navigate = useNavigate(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setIsSubmitting(true); const success = await login(email, password); if (success) { navigate('/'); } setIsSubmitting(false); }; return (
mockupAWS
Sign in Enter your credentials to access your account
setEmail(e.target.value)} required autoComplete="email" />
Forgot password?
setPassword(e.target.value)} required autoComplete="current-password" />

Don't have an account?{' '} Create account

AWS Cost Simulator & Backend Profiler

); }