@@ -35,10 +35,7 @@ const ProjectsPageCard: React.FC<INeurosynthProjectReturn> = (props) => {
3535 meta_analyses = [ ] ,
3636 } = props ;
3737
38- const { data : studyset } = useGetStudysetById (
39- provenance ?. extractionMetadata ?. studysetId ,
40- false
41- ) ;
38+ const { data : studyset } = useGetStudysetById ( provenance ?. extractionMetadata ?. studysetId , false ) ;
4239 const { data : metaAnalyses = [ ] } = useGetMetaAnalysesByIds ( meta_analyses as string [ ] ) ;
4340
4441 const lastUpdateDate = useMemo ( ( ) => {
@@ -67,13 +64,9 @@ const ProjectsPageCard: React.FC<INeurosynthProjectReturn> = (props) => {
6764 if ( ! provenance . extractionMetadata . studysetId ) return ;
6865
6966 const studysetStudies = ( studyset ?. studies || [ ] ) as string [ ] ;
70- const studyStatusesList = provenance . extractionMetadata . studyStatusList ;
67+ const studyStatusesList = provenance . extractionMetadata ? .studyStatusList ?? [ ] ;
7168 return getExtractionSummary ( studysetStudies , studyStatusesList ) ;
72- } , [
73- provenance . extractionMetadata . studyStatusList ,
74- provenance . extractionMetadata . studysetId ,
75- studyset ?. studies ,
76- ] ) ;
69+ } , [ provenance . extractionMetadata ?. studyStatusList , provenance . extractionMetadata . studysetId , studyset ?. studies ] ) ;
7770
7871 const activeStep = useMemo ( ( ) => {
7972 if ( ! curationSummary ) return - 1 ;
@@ -85,12 +78,7 @@ const ProjectsPageCard: React.FC<INeurosynthProjectReturn> = (props) => {
8578 ) ;
8679 if ( metaAnalyses ?. length === 0 || metaAnalysesWithResults . length === 0 ) return 2 ;
8780 return 3 ; // getting here means that at least one meta-analysis has been run
88- } , [
89- curationSummary ,
90- extractionSummary ,
91- metaAnalyses ,
92- provenance ?. metaAnalysisMetadata ?. canEditMetaAnalyses ,
93- ] ) ;
81+ } , [ curationSummary , extractionSummary , metaAnalyses , provenance ?. metaAnalysisMetadata ?. canEditMetaAnalyses ] ) ;
9482
9583 const metaAnalysisOptionalText = useMemo ( ( ) => {
9684 if ( ! metaAnalyses || metaAnalyses . length === 0 ) {
@@ -131,16 +119,12 @@ const ProjectsPageCard: React.FC<INeurosynthProjectReturn> = (props) => {
131119 >
132120 < ProjectsPageCardStep
133121 title = "Curation"
134- optionalText = {
135- activeStep < 0 ? 'Not started' : activeStep === 0 ? 'In progress' : ''
136- }
122+ optionalText = { activeStep < 0 ? 'Not started' : activeStep === 0 ? 'In progress' : '' }
137123 isActive = { activeStep === 0 }
138124 />
139125 < ProjectsPageCardStep
140126 title = "Extraction"
141- optionalText = {
142- activeStep < 1 ? 'Not started' : activeStep === 1 ? 'In progress' : ''
143- }
127+ optionalText = { activeStep < 1 ? 'Not started' : activeStep === 1 ? 'In progress' : '' }
144128 isActive = { activeStep === 1 }
145129 />
146130 < ProjectsPageCardStep
@@ -168,12 +152,7 @@ const ProjectsPageCard: React.FC<INeurosynthProjectReturn> = (props) => {
168152 />
169153 ) }
170154 { created_at && (
171- < Chip
172- label = { `Created: ${ createdDate } ` }
173- variant = "outlined"
174- size = "small"
175- sx = { { mr : '6px' } }
176- />
155+ < Chip label = { `Created: ${ createdDate } ` } variant = "outlined" size = "small" sx = { { mr : '6px' } } />
177156 ) }
178157 { provenance ?. curationMetadata ?. prismaConfig ?. isPrisma && (
179158 < Chip
@@ -185,11 +164,7 @@ const ProjectsPageCard: React.FC<INeurosynthProjectReturn> = (props) => {
185164 />
186165 ) }
187166 { studyset && (
188- < Chip
189- variant = "outlined"
190- size = "small"
191- label = { `${ ( studyset . studies || [ ] ) . length } studies` }
192- />
167+ < Chip variant = "outlined" size = "small" label = { `${ ( studyset . studies || [ ] ) . length } studies` } />
193168 ) }
194169 </ Box >
195170 < MuiLink
@@ -229,19 +204,12 @@ const ProjectsPageCard: React.FC<INeurosynthProjectReturn> = (props) => {
229204 < Box >
230205 { activeStep < 0 ? (
231206 < Box sx = { { color : 'warning.dark' } } >
232- This project has not been initialized. Click the name of this project
233- (above) to get started
207+ This project has not been initialized. Click the name of this project (above) to get started
234208 </ Box >
235209 ) : activeStep === 0 && curationSummary ? (
236- < ProjectsPageCardSummaryCuration
237- projectId = { id || '' }
238- { ...curationSummary }
239- />
210+ < ProjectsPageCardSummaryCuration projectId = { id || '' } { ...curationSummary } />
240211 ) : activeStep === 1 && extractionSummary ? (
241- < ProjectsPageCardExtractionSummary
242- projectId = { id || '' }
243- { ...extractionSummary }
244- />
212+ < ProjectsPageCardExtractionSummary projectId = { id || '' } { ...extractionSummary } />
245213 ) : (
246214 < ProjectsPageCardSummaryMetaAnalyses
247215 projectId = { id || '' }
0 commit comments