'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 (
Sign in to your Falah account
No account?{' '} Create one free
بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ