Changing loading and error msg

This commit is contained in:
Adam Harvey
2021-02-19 14:12:21 -05:00
parent a45dd99b90
commit 38c8c8a538
@@ -156,21 +156,24 @@ export const ScaffolderPageContents = () => {
<ResultsFilter availableCategories={availableCategories} />
</div>
<div>
{!matchingEntities && loading && <Progress />}
{matchingEntities && !matchingEntities.length && (
<Typography variant="body2">
Shoot! Looks like you don't have any templates. Check out the
documentation{' '}
<Link href="https://backstage.io/docs/features/software-templates/adding-templates">
here!
</Link>
</Typography>
)}
{loading && <Progress />}
{error && (
<WarningPanel title="Oops! Something went wrong loading the templates">
{error.message}
</WarningPanel>
)}
{!error && !loading && matchingEntities && !matchingEntities.length && (
<Typography variant="body2">
No templates found that match your filter. Learn more about{' '}
<Link href="https://backstage.io/docs/features/software-templates/adding-templates">
adding templates
</Link>.
</Typography>
)}
<Grid container>
{matchingEntities &&
matchingEntities?.length > 0 &&