import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; import { Label } from '@/components/ui/label'; import { useAuth } from '@/context/AuthContext'; import { useState } from 'react'; export default function AuthModal({ open, onOpenChange }) { const { login } = useAuth(); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [isLoading, setIsLoading] = useState(false); const handleSubmit = async (e) => { e.preventDefault(); setIsLoading(true); await login(email, password); setIsLoading(false); onOpenChange(false); }; return ( Welcome back Enter your credentials to access your AI studio workspace.
setEmail(e.target.value)} required />
setPassword(e.target.value)} required />
Don't have an account? Register
); }