diff --git a/app/complete-profile/page.tsx b/app/complete-profile/page.tsx index 81ffeeeb..81b8e342 100644 --- a/app/complete-profile/page.tsx +++ b/app/complete-profile/page.tsx @@ -23,6 +23,7 @@ function RegisterComponent() { const [contactInfo, setContactInfo] = useState(''); const [location, setLocation] = useState(''); const [gender, setGender] = useState(''); + const [age, setAge] = useState(0); const [personalityType, setPersonalityType] = useState(''); const [conflictStyle, setConflictStyle] = useState(''); const [image, setImage] = useState(null); @@ -59,6 +60,9 @@ function RegisterComponent() { setGender(profile.gender || ''); setPersonalityType(profile.personalityType || null); setConflictStyle(profile.conflictStyle || ''); + if (profile.birthYear) { + setAge(new Date().getFullYear() - profile.birthYear); + } await parseImage(profile.image, setImage); // Set selected interests if any @@ -356,6 +360,21 @@ function RegisterComponent() { +
+ + setAge(e.target.value)} + className="appearance-none rounded-md relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm" + // placeholder="" + /> +
+