Merge pull request #2956 from abhishekjakhar/fix/entities

fix(unregister-entities): UI handling when no entities are available from api
This commit is contained in:
Fredrik Adelöw
2020-10-19 16:53:54 +02:00
committed by GitHub
2 changed files with 9 additions and 4 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': patch
---
handle the case where no entities are available to show
@@ -85,7 +85,7 @@ export const UnregisterEntityDialog: FC<Props> = ({
{error.toString()}
</Alert>
) : null}
{entities ? (
{entities?.length ? (
<>
<DialogContentText>
This action will unregister the following entities:
@@ -107,11 +107,11 @@ export const UnregisterEntityDialog: FC<Props> = ({
</li>
</ul>
</Typography>
<DialogContentText>
To undo, just re-register the entity in Backstage.
</DialogContentText>
</>
) : null}
<DialogContentText>
To undo, just re-register the entity in Backstage.
</DialogContentText>
</DialogContent>
<DialogActions>
<Button onClick={onClose} color="primary">