Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix academicYear error handling #537

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading