'use client' import { useState } from 'react' import { signIn } from 'next-auth/react' import { useRouter } from 'next/navigation' import { Flame } from 'lucide-react' export default function LoginPage() { const router = useRouter() const [email, setEmail] = useState('') const [password, setPassword] = useState('') const [error, setError] = useState('') const [loading, setLoading] = useState(false) const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() setLoading(true) setError('') const result = await signIn('credentials', { redirect: false, email, password, }) if (result?.error) { setError('Geçersiz e-posta veya şifre') setLoading(false) } else { router.push('/admin') router.refresh() } } return (

Teras Steakhouse

Yönetici Girişi

{error && (
{error}
)}
setEmail(e.target.value)} required className="w-full px-4 py-3 border border-border rounded-md focus:ring-2 focus:ring-primary/50 focus:border-primary/50 bg-background text-foreground transition-colors outline-none" placeholder="admin@ayris.tech" />
setPassword(e.target.value)} required className="w-full px-4 py-3 border border-border rounded-md focus:ring-2 focus:ring-primary/50 focus:border-primary/50 bg-background text-foreground transition-colors outline-none" placeholder="••••••••" />
Demo: admin@ayris.tech / admin
) }