From 0baca8ce5cd9a977706f159a6a46d6b389231267 Mon Sep 17 00:00:00 2001 From: Eddy Chen <89349085+ecxyzzy@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:41:33 -0800 Subject: [PATCH] fix: grab review form fix from #375 Co-authored-by: Jacob Sommer --- site/src/component/ReviewForm/ReviewForm.tsx | 25 +++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) 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 - + ) })}