From 41fa147a1f7b35c807a63c40251cee9d599595e2 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Wed, 29 Sep 2021 18:59:09 +0200 Subject: [PATCH] provide default techdocs reader page in the app Signed-off-by: Emma Indal --- packages/app/src/App.tsx | 6 ++- .../src/components/techdocs/TechDocsPage.tsx | 44 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 packages/app/src/components/techdocs/TechDocsPage.tsx diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx index 87984bece0..109ae7922e 100644 --- a/packages/app/src/App.tsx +++ b/packages/app/src/App.tsx @@ -84,6 +84,8 @@ import { searchPage } from './components/search/SearchPage'; import { providers } from './identityProviders'; import * as plugins from './plugins'; +import { techDocsPage } from './components/techdocs/TechDocsPage'; + const app = createApp({ apis, plugins: Object.values(plugins), @@ -170,7 +172,9 @@ const routes = ( } - /> + > + {techDocsPage} + }> diff --git a/packages/app/src/components/techdocs/TechDocsPage.tsx b/packages/app/src/components/techdocs/TechDocsPage.tsx new file mode 100644 index 0000000000..ce97d4a38e --- /dev/null +++ b/packages/app/src/components/techdocs/TechDocsPage.tsx @@ -0,0 +1,44 @@ +/* + * Copyright 2021 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Content } from '@backstage/core-components'; +import { + TechDocsPageHeader, + TechDocsPage, + Reader, +} from '@backstage/plugin-techdocs'; +import React from 'react'; + +const DefaultTechDocsPage = () => { + return ( + + {({ techdocsMetadataValue, entityMetadataValue, entityId, onReady }) => ( + <> + + + + + + )} + + ); +}; + +export const techDocsPage = ;