'use client' import { useState } from 'react' import { signIn } from 'next-auth/react' import { useRouter, useParams } from 'next/navigation' import Link from 'next/link' import Image from 'next/image' import { Lock, ArrowLeft } from 'lucide-react' export default function LoginPage() { const router = useRouter() const params = useParams() const locale = (params?.locale as string) || 'tr' 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(`/${locale}/admin`) router.refresh() } } return (
Ana Sayfaya Dön
AyrisLegal

Yönetici Girişi

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

{error && (
{error}
)}
setEmail(e.target.value)} required className="w-full min-h-[44px] px-4 py-2.5 border border-zinc-200 rounded-xl focus:outline-none focus:border-[#E61919] focus:ring-2 focus:ring-[#E61919]/20 bg-white text-zinc-900 text-sm transition-all" placeholder="admin@ayris.tech" />
setPassword(e.target.value)} required className="w-full min-h-[44px] px-4 py-2.5 border border-zinc-200 rounded-xl focus:outline-none focus:border-[#E61919] focus:ring-2 focus:ring-[#E61919]/20 bg-white text-zinc-900 text-sm transition-all" placeholder="••••••••" />
Demo: admin@ayris.tech / admin
© {new Date().getFullYear()} AyrisLegal · Created by ayris.tech
) }