'use client' import { useState } from 'react' import { useAuth } from '@/hooks/useAuth' export default function LoginModal({ onClose }: { onClose: () => void }) { const { login } = useAuth() const [email, setEmail] = useState('') const [password, setPassword] = useState('') const [error, setError] = useState('') const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() try { await login(email, password) onClose() } catch (err: any) { setError(err.message || 'Login failed') } } return (
e.stopPropagation()} className="w-full max-w-sm space-y-4 rounded-2xl bg-white/10 p-8 backdrop-blur-md" >

Вход

{error &&

{error}

} setEmail(e.target.value)} className="w-full rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-white placeholder-white/40 outline-none focus:border-green-500" required /> setPassword(e.target.value)} className="w-full rounded-lg border border-white/10 bg-white/5 px-4 py-3 text-white placeholder-white/40 outline-none focus:border-green-500" required />
) }