File tree Expand file tree Collapse file tree
packages/libs/eda/src/lib/core/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,10 +13,11 @@ import {
1313import { DownloadClient } from '../api/DownloadClient' ;
1414import { ComputeClient } from '../api/ComputeClient' ;
1515import { useDeepValue } from '../hooks/immutability' ;
16+ import Banner from '@veupathdb/coreui/lib/components/banners/Banner' ;
1617
1718interface Props {
1819 studyId : string ;
19- children : React . ReactChild | React . ReactChild [ ] ;
20+ children : React . ReactNode ;
2021 className ?: string ;
2122 analysisClient : AnalysisClient ;
2223 subsettingClient : SubsettingClient ;
@@ -48,6 +49,17 @@ export function EDAAnalysisListContainer(props: Props) {
4849 computeClient,
4950 } ) ;
5051
52+ if ( studyMetadata . error )
53+ return (
54+ < Banner
55+ banner = { {
56+ type : 'warning' ,
57+ message :
58+ 'The dataset you requested could not be found. Please check the URL and try again.' ,
59+ } }
60+ />
61+ ) ;
62+
5163 if (
5264 contextValue . studyRecord == null ||
5365 contextValue . studyRecordClass == null ||
Original file line number Diff line number Diff line change 1- import React , { ReactNode , useMemo } from 'react' ;
1+ import { ReactNode , useMemo } from 'react' ;
22
33import { Loading } from '@veupathdb/wdk-client/lib/Components' ;
44import { TreeNode } from '@veupathdb/wdk-client/lib/Components/AttributeFilter/Types' ;
@@ -23,6 +23,7 @@ import { DownloadClient } from '../api/DownloadClient';
2323import { entityTreeToArray } from '../utils/study-metadata' ;
2424import { ComputeClient } from '../api/ComputeClient' ;
2525import { useDeepValue } from '../hooks/immutability' ;
26+ import Banner from '@veupathdb/coreui/lib/components/banners/Banner' ;
2627
2728export interface Props {
2829 studyId : string ;
@@ -44,8 +45,21 @@ export function EDAWorkspaceContainer(props: Props) {
4445
4546 const wdkStudyRecordState = useWdkStudyRecord ( studyId ) ;
4647 const studyMetadata = useStudyMetadata ( studyId , subsettingClient ) ;
48+
49+ if ( studyMetadata . error )
50+ return (
51+ < Banner
52+ banner = { {
53+ type : 'warning' ,
54+ message :
55+ 'The dataset you requested could not be found. Please check the URL and try again.' ,
56+ } }
57+ />
58+ ) ;
59+
4760 if ( wdkStudyRecordState == null || studyMetadata . value == null )
4861 return < Loading /> ;
62+
4963 return (
5064 < EDAWorkspaceContainerWithLoadedData
5165 { ...props }
You can’t perform that action at this time.
0 commit comments