File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
src/apps/review/src/lib/components Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,8 @@ export const SubmissionHistoryModal: FC<SubmissionHistoryModalProps> = (props: S
100100 [ props . submissions ] ,
101101 )
102102
103- const aiReviewersCount = useMemo ( ( ) => ( props . aiReviewers ?. length ?? 0 ) + 1 , [ props . aiReviewers ] )
103+ const aiReviewers = useMemo ( ( ) => props . aiReviewers ?? [ ] , [ props . aiReviewers ] )
104+ const aiReviewersCount = useMemo ( ( ) => ( aiReviewers . length ?? 0 ) + 1 , [ aiReviewers ] )
104105
105106 const [ toggledRows , setToggledRows ] = useState ( new Set < string > ( ) )
106107
@@ -279,7 +280,7 @@ export const SubmissionHistoryModal: FC<SubmissionHistoryModalProps> = (props: S
279280 < td className = { styles . aiReviewersTableRow } colSpan = { 4 } >
280281 < div className = { styles . aiReviewersTable } >
281282 < AiReviewsTable
282- reviewers = { props . aiReviewers ! }
283+ reviewers = { aiReviewers }
283284 submission = { submission }
284285 />
285286 </ div >
Original file line number Diff line number Diff line change @@ -802,13 +802,18 @@ export const TableSubmissionScreening: FC<Props> = (props: Props) => {
802802 [ historySourceSubmissions , primarySubmissionInfos ] ,
803803 )
804804
805- const { historyByMember } : SubmissionHistoryPartition = submissionHistory
805+ const { historyByMember, latestSubmissionIds } : SubmissionHistoryPartition = submissionHistory
806806
807807 const shouldShowHistoryActions = useMemo (
808808 ( ) => hasIsLatestFlag ( primarySubmissionInfos ) ,
809809 [ primarySubmissionInfos ] ,
810810 )
811811
812+ const filteredScreenings = useMemo ( ( ) => (
813+ props . screenings
814+ . filter ( screening => latestSubmissionIds . has ( screening . submissionId ) )
815+ ) , [ props . screenings , latestSubmissionIds ] )
816+
812817 const hasAnyScreeningAssignment = useMemo (
813818 ( ) => props . screenings . some ( screening => Boolean ( screening . myReviewResourceId ) ) ,
814819 [ props . screenings ] ,
@@ -1172,7 +1177,7 @@ export const TableSubmissionScreening: FC<Props> = (props: Props) => {
11721177 ) : (
11731178 < Table
11741179 columns = { columns }
1175- data = { props . screenings }
1180+ data = { filteredScreenings }
11761181 disableSorting
11771182 onToggleSort = { _ . noop }
11781183 removeDefaultSort
You can’t perform that action at this time.
0 commit comments