Skip to content

Commit

Permalink
Fix academicYear error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
meleongg committed Dec 1, 2023
1 parent cdeea6f commit f34b2de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/ApplicationForm/BasicInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const educationOptions = [
// { value: 'preferNotToAnswer', label: 'Prefer not to answer' },
// ]

const academicYear = [
const academicYearOptions = [
{ value: 'Secondary/High School', label: 'Secondary/High School' },
{ value: '1st year', label: '1st year' },
{ value: '2nd year', label: '2nd year' },
Expand Down Expand Up @@ -615,10 +615,10 @@ export default ({ refs, errors, formInputs, onChange }) => (
</SubHeading>
{errors?.academicYear && <ErrorMessage>{errors?.academicYear}</ErrorMessage>}
<Dropdown
options={academicYear}
options={academicYearOptions}
placeholder="Academic Year"
isSearchable={false}
value={findElement(graduationOptions, 'value', formInputs.academicYear)}
value={findElement(academicYearOptions, 'value', formInputs.academicYear)}
onChange={inputValue =>
onChange({
academicYear: inputValue.value,
Expand Down
1 change: 1 addition & 0 deletions src/utility/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ export const HACKER_APPLICATION_TEMPLATE = Object.freeze({
major: '',
educationLevel: '',
graduation: null,
academicYear: '',
countryOfResidence: '',
willBeAgeOfMajority: null,
},
Expand Down

0 comments on commit f34b2de

Please sign in to comment.