diff --git a/src/app/(account)/settings/PersonalInfoSettings.tsx b/src/app/(account)/settings/PersonalInfoSettings.tsx index 8d948239..f1b0c11b 100644 --- a/src/app/(account)/settings/PersonalInfoSettings.tsx +++ b/src/app/(account)/settings/PersonalInfoSettings.tsx @@ -2,6 +2,7 @@ import Button from '@/components/Button'; import ControlledField from '@/components/ControlledField'; import { AGE_BRACKETS, GENDERS, STUDENT_TYPES, STUDENT_STATUSES } from '@/constants/student-info'; import { useMount } from '@/hooks/use-mount'; +import { useUser } from '@clerk/nextjs'; import { zodResolver } from '@hookform/resolvers/zod'; import { useState } from 'react'; import { useForm } from 'react-hook-form'; @@ -23,9 +24,10 @@ const personalInfoSchema = z.object({ }); export default function PersonalInfoSettings() { + const { user } = useUser(); const [formData, setFormData] = useState({ - firstName: '', - lastName: '', + firstName: user?.firstName || '', + lastName: user?.lastName || '', ageBracket: '', gender: '', studentType: '', @@ -62,10 +64,8 @@ export default function PersonalInfoSettings() { return (