return loading and error before entities and empty state

Signed-off-by: nikolar <reyna.nikolayev@autodesk.com>
This commit is contained in:
nikolar
2023-11-01 08:17:18 -07:00
parent 78c2cdf02d
commit 7393c44148
@@ -109,10 +109,15 @@ export const FeaturedDocs = (props: FeaturedDocsProps) => {
return response.items;
});
if (loading) {
return <Progress />;
}
if (error) {
return <ErrorPanel error={error} />;
}
return (
<InfoCard variant="gridItem" title={title || 'Featured Docs'}>
{loading && <Progress />}
{error && <ErrorPanel error={error} />}
{entities?.length
? entities.map(d => (
<div key={d.metadata.name} data-testid="docs-card-content">