'use client' import { useState } from 'react' import { useAuth } from '@/lib/AuthContext' import { useRouter } from 'next/navigation' import Link from 'next/link' import { Eye, EyeOff } from 'lucide-react' export default function LoginPage() { const { login } = useAuth() const router = useRouter() const [email, setEmail] = useState('') const [password, setPassword] = useState('') const [showPass, setShowPass] = useState(false) const [error, setError] = useState('') const [loading, setLoading] = useState(false) const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() setLoading(true) setError('') try { await login(email, password) router.push('/nur') } catch (err: any) { setError(err.message || 'Invalid email or password') } finally { setLoading(false) } } return (
{/* Brand */}
ف

Welcome back

Sign in to your Falah account

{/* Form */}
setEmail(e.target.value)} required autoComplete="email" inputMode="email" className="w-full bg-gray-50 border border-gray-200 rounded-xl px-4 py-4 text-gray-900 placeholder-gray-400 focus:border-emerald-400 focus:outline-none transition" />
setPassword(e.target.value)} required autoComplete="current-password" className="w-full bg-gray-50 border border-gray-200 rounded-xl px-4 py-4 pr-14 text-gray-900 placeholder-gray-400 focus:border-emerald-400 focus:outline-none transition" />
{error && (

{error}

)}

No account?{' '} Create one free

بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ

) }