fixed issue where error message would be 0 instead of empty element

Signed-off-by: Daniele.Mazzotta <daniele.mazzotta@tii.ae>
This commit is contained in:
Daniele.Mazzotta
2022-06-23 10:07:08 +04:00
parent f74361a585
commit 007cba9eb1
@@ -162,12 +162,14 @@ export const DagTableComponent = ({ dagIds }: DagTableComponentProps) => {
: [];
return (
<>
{dagsNotFound.length && (
{dagsNotFound.length ? (
<WarningPanel title={`${dagsNotFound.length} DAGs were not found`}>
{dagsNotFound.map(dagId => (
<Typography key={dagId}>{dagId}</Typography>
))}
</WarningPanel>
) : (
''
)}
<DenseTable dags={data || []} />
</>