diff --git a/.changeset/curly-poems-boil.md b/.changeset/curly-poems-boil.md new file mode 100644 index 0000000000..22d5df4665 --- /dev/null +++ b/.changeset/curly-poems-boil.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-scaffolder': patch +--- + +Update messages that process during loading, error, and no templates found. +Remove unused dependencies. diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index c5b264154d..2018887013 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -45,7 +45,6 @@ "git-url-parse": "^11.4.4", "humanize-duration": "^3.25.1", "luxon": "^1.25.0", - "moment": "^2.26.0", "react": "^16.13.1", "react-dom": "^16.13.1", "react-lazylog": "^4.5.2", diff --git a/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx b/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx index 74582d0762..e4ebc75b2e 100644 --- a/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx +++ b/plugins/scaffolder/src/components/ScaffolderPage/ScaffolderPage.tsx @@ -156,21 +156,27 @@ export const ScaffolderPageContents = () => {
- {!matchingEntities && loading && } - {matchingEntities && !matchingEntities.length && ( - - Shoot! Looks like you don't have any templates. Check out the - documentation{' '} - - here! - - - )} + {loading && } + {error && ( {error.message} )} + + {!error && + !loading && + matchingEntities && + !matchingEntities.length && ( + + No templates found that match your filter. Learn more about{' '} + + adding templates + + . + + )} + {matchingEntities && matchingEntities?.length > 0 &&