diff --git a/src/components/FormDivider.tsx b/src/components/FormDivider.tsx index 0a458bc1..dec6354e 100644 --- a/src/components/FormDivider.tsx +++ b/src/components/FormDivider.tsx @@ -4,7 +4,7 @@ interface FormDividerProps { const FormDivider: React.FC = ({ label }) => { return ( - + {label} ); diff --git a/src/pages/apply.tsx b/src/pages/apply.tsx index a3d5089e..76fb367d 100644 --- a/src/pages/apply.tsx +++ b/src/pages/apply.tsx @@ -186,7 +186,7 @@ const ApplyForm = ({ }, }); - useFormPersist(`applyForm:${persistId}`, { + useFormPersist(`dh11-applyForm:${persistId}`, { watch, setValue, storage: localStorage, @@ -196,7 +196,6 @@ const ApplyForm = ({ console.log(data); console.log("validating"); const processed = applicationSchema.parse(data); - console.log("validated"); await submitAppAsync(processed); @@ -569,13 +568,54 @@ const ApplyForm = ({ {errors.discoverdFrom.message} )} + + + + +
+ + +
+ +
- {errors.gender && ( - {errors.gender.message} + {errors.underrepresented && ( + {errors.underrepresented.message} )}
- Orientation + Do you consider yourself to be any of the following?{" "} + + (Optional) +
{errors.race.message} )}
- - - -
- - -
- - (!!string ? string : null)) .nullish(), - linkToResume: z.string().url().nullable(), + linkToResume: z.string().nullish(), tshirtSize: z.enum(["XS", "S", "M", "L", "XL"]), hackerKind: z.array(z.string()).min(1, "At least one selection is required"), alreadyHaveTeam: z.boolean(), @@ -190,10 +190,10 @@ const dh11schema = z.object({ .min(1, "At least one selection is required"), considerCoffee: z.boolean(), dietaryRestrictions: z.string().nullish(), - underrepresented: YesNoUnsure, - gender: z.string(), - race: z.string(), - orientation: z.string(), + underrepresented: YesNoUnsure.default("UNSURE"), + gender: z.string().default("Prefer not to say"), + race: z.string().default("Prefer not to say"), + orientation: z.string().default("Prefer not to say"), emergencyContactName: z.string().min(1, "This field is required"), emergencyContactPhone: z .string()