File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/components/UserProfile Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ type UserFormData = {
1313 lastName : string ;
1414 email : string ;
1515 institution : string ;
16+ progam : string ;
1617 willEatMeals : boolean ;
1718 allergies : string ;
1819} ;
@@ -23,6 +24,7 @@ const getFormValues = (userDetails: any): UserFormData => ({
2324 lastName : userDetails ?. lastName || "" ,
2425 email : userDetails ?. email || "" ,
2526 institution : userDetails ?. institution || "" ,
27+ program : userDetails ?. program || "" ,
2628 willEatMeals : Boolean ( userDetails ?. willEatMeals ) ,
2729 allergies : userDetails ?. allergies || "" ,
2830} ) ;
@@ -153,10 +155,8 @@ export default function UserForm({
153155 < input
154156 className = { `${ "md:text-md my-2 rounded-full border-4 border-white bg-white py-2 ps-3 text-sm" } ${ isEditing ? "text-black" : "text-ehhh-grey" } ` }
155157 type = "text"
156- placeholder = { formState . program ?? "e.g. Engineering" }
157- onChange = { ( e : React . ChangeEvent < HTMLInputElement > ) => onChange ( e ) }
158- value = { formState . program ?? "" }
159- name = "program"
158+ placeholder = { "e.g. Engineering" }
159+ { ...register ( "program" ) }
160160 disabled = { ! isEditing } // Disabled when not in edit mode
161161 />
162162 < label > Do you want provided meals at the hackathon?</ label >
You can’t perform that action at this time.
0 commit comments