'use client'; import { useState } from 'react'; import { useRouter } from 'next/navigation'; import Link from 'next/link'; import { useAuth } from '@/lib/hooks/useAuth'; import { Building2, Mail, Lock, ArrowRight, Loader2 } from 'lucide-react'; export default function LoginPage() { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(''); const [loading, setLoading] = useState(false); const [rememberMe, setRememberMe] = useState(false); const router = useRouter(); const { login } = useAuth(); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); setError(''); setLoading(true); try { await login(email, password); router.push('/dashboard'); } catch (err: any) { setError(err.message || 'Invalid credentials'); } finally { setLoading(false); } }; return (
{/* Logo */}
CRESync

Commercial Real Estate CRM

{/* Login Card */}

Welcome Back

Enter your credentials to continue

{error && (
{error}
)}
setEmail(e.target.value)} className="w-full h-14 clay-input pl-12 pr-4 border border-gray-200" required />
Forgot password?
setPassword(e.target.value)} className="w-full h-14 clay-input pl-12 pr-4 border border-gray-200" required />

Don't have an account?{' '} Create one

{/* Footer */}

By signing in, you agree to our{' '} Terms {' '}and{' '} Privacy Policy

); }