'use client' import { useState } from 'react' import { signIn } from 'next-auth/react' import { useRouter } from 'next/navigation' 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 (

Admin Girişi

Yönetim paneline erişmek için giriş yapın

{error && (
{error}
)}
setEmail(e.target.value)} required className="w-full px-4 py-2 border border-gray-300 dark:border-gray-700 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-900 text-gray-900 dark:text-white transition-colors" placeholder="admin@ayris.tech" />
setPassword(e.target.value)} required className="w-full px-4 py-2 border border-gray-300 dark:border-gray-700 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-900 text-gray-900 dark:text-white transition-colors" placeholder="••••••••" />
Demo credentials: admin@ayris.tech / admin
) }