Use MissingAnnotationEmptyState for plugins (#2824)
This commit is contained in:
@@ -17,8 +17,7 @@
|
||||
import React from 'react';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import { WarningPanel } from '@backstage/core';
|
||||
|
||||
import { MissingAnnotationEmptyState } from '@backstage/core';
|
||||
import {
|
||||
rootRouteRef,
|
||||
rootDocsRouteRef,
|
||||
@@ -43,15 +42,7 @@ export const EmbeddedDocsRouter = ({ entity }: { entity: Entity }) => {
|
||||
const projectId = entity.metadata.annotations?.[TECHDOCS_ANNOTATION];
|
||||
|
||||
if (!projectId) {
|
||||
return (
|
||||
<WarningPanel title="Techdocs plugin:">
|
||||
<pre>{TECHDOCS_ANNOTATION}</pre> annotation is missing on the entity.
|
||||
<br />
|
||||
<a href="https://backstage.io/docs/features/techdocs/creating-and-publishing">
|
||||
Getting Started
|
||||
</a>
|
||||
</WarningPanel>
|
||||
);
|
||||
return <MissingAnnotationEmptyState annotation={TECHDOCS_ANNOTATION} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user