import React, { useState } from 'react'; import { useForm, Head, Link } from '@inertiajs/react'; import { Eye, EyeOff, Loader2, AlertTriangle, Info, XCircle, Users, TrendingUp, MessageSquare } from 'lucide-react'; export default function Login({ flash }) { const { data, setData, post, processing, errors, setError, clearErrors } = useForm({ email: '', password: '', remember: false, }); const [showPassword, setShowPassword] = useState(false); const validateForm = () => { let valid = true; clearErrors(); if (!data.email.trim()) { setError('email', 'Email address is required.'); valid = false; } else if (!/\S+@\S+\.\S+/.test(data.email)) { setError('email', 'Please enter a valid email address.'); valid = false; } if (!data.password) { setError('password', 'Password is required.'); valid = false; } return valid; }; const handleSubmit = (e) => { e.preventDefault(); if (!validateForm()) { return; } post('/employer/login'); }; return (
Unlock direct access to top domestic candidates with a Migrant premium subscription. Find, interview, and hire directly without middlemen.
Sign in to your sponsor portal to continue searching
New sponsor?{' '} Create account