diff --git a/site/src/component/ReviewForm/ReviewForm.tsx b/site/src/component/ReviewForm/ReviewForm.tsx index 28c40023..a0f3c0bb 100644 --- a/site/src/component/ReviewForm/ReviewForm.tsx +++ b/site/src/component/ReviewForm/ReviewForm.tsx @@ -161,16 +161,15 @@ const ReviewForm: FC = (props) => { } // select instructor if in course context - const instructorSelect = props.course && + const instructorSelect = props.course && Taken With - (setProfessor(document.getElementsByName(e.target.value)[0].id))}> - - {Object.keys(props.course?.instructorHistory!).map((ucinetid, i) => { + (setProfessor(e.target.value))}> + + {Object.keys(props.course?.instructorHistory).map((ucinetid) => { const name = props.course?.instructorHistory[ucinetid].shortenedName; return ( - // @ts-ignore name attribute isn't supported - + ) })} @@ -183,18 +182,16 @@ const ReviewForm: FC = (props) => { Missing instructor - // select course if in professor context const courseSelect = props.professor && Course Taken - (setCourse(document.getElementsByName(e.target.value)[0].id))}> - - {Object.keys(props.professor?.courseHistory!).map((courseID, i) => { + (setCourse(e.target.value))}> + + {Object.keys(props.professor?.courseHistory).map((courseID) => { const name = props.professor?.courseHistory[courseID].department + ' ' + props.professor?.courseHistory[courseID].courseNumber; return ( - // @ts-ignore name attribute isn't supported - + ) })}