"use client"; import { useState } from 'react'; interface NameInputScreenProps { onNameSubmit: (name: string) => void; } export default function NameInputScreen({ onNameSubmit }: NameInputScreenProps) { const [fullName, setFullName] = useState(''); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(''); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); if (!fullName.trim()) { setError('Please enter your full name'); return; } if (fullName.trim().split(' ').length < 2) { setError('Please enter your first and last name'); return; } setIsLoading(true); setError(''); // Small delay to show loading state setTimeout(() => { onNameSubmit(fullName.trim()); }, 500); }; return (
{/* Header */}

Personal Information

Please provide your full name to continue

{/* Content */}
{ setFullName(e.target.value); setError(''); }} className={`w-full px-4 py-3 border rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors text-gray-900 placeholder-gray-500 ${ error ? 'border-red-500 bg-red-50' : 'border-gray-300 bg-white' }`} placeholder="Enter your first and last name" disabled={isLoading} /> {error && (

{error}

)}

Privacy Notice

Your name is visible only to the job poster and will be used for evaluation purposes only.

); }