diff --git a/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx b/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx
index 4bc7cfd98c..a2082ef972 100644
--- a/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx
+++ b/plugins/config-schema/src/components/ConfigSchemaPage/ConfigSchemaPage.tsx
@@ -14,23 +14,35 @@
* limitations under the License.
*/
import React, { useMemo } from 'react';
-import { Header, Page, Content, useApi } from '@backstage/core';
+import { Header, Page, Content, useApi, Progress } from '@backstage/core';
import { useObservable } from 'react-use';
import { configSchemaApiRef } from '../../api';
import { SchemaViewer } from '../SchemaViewer';
+import { Typography } from '@material-ui/core';
export const ConfigSchemaPage = () => {
const configSchemaApi = useApi(configSchemaApiRef);
- const schema = useObservable(
+ const schemaResult = useObservable(
useMemo(() => configSchemaApi.schema$(), [configSchemaApi]),
- )?.schema;
+ );
+
+ let content;
+ if (schemaResult) {
+ if (schemaResult.schema) {
+ content = ;
+ } else {
+ content = (
+ No configuration schema available
+ );
+ }
+ } else {
+ content = ;
+ }
return (
-
- {schema ? : 'No schema available'}
-
+ {content}
);
};