plugins: cleanup unnecessary use of compatWrapper

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2025-11-23 00:51:55 +01:00
parent 358c6f7021
commit d02db50b42
19 changed files with 186 additions and 235 deletions
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import { compatWrapper } from '@backstage/core-compat-api';
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
import { isKubernetesAvailable } from '../Router';
@@ -26,8 +25,6 @@ export const entityKubernetesContent = EntityContentBlueprint.make({
group: 'deployment',
filter: isKubernetesAvailable,
loader: () =>
import('./KubernetesContentPage').then(m =>
compatWrapper(<m.KubernetesContentPage />),
),
import('./KubernetesContentPage').then(m => <m.KubernetesContentPage />),
},
});
+3 -6
View File
@@ -14,11 +14,8 @@
* limitations under the License.
*/
import { PageBlueprint } from '@backstage/frontend-plugin-api'; // Add this line to import React
import {
compatWrapper,
convertLegacyRouteRef,
} from '@backstage/core-compat-api';
import { PageBlueprint } from '@backstage/frontend-plugin-api';
import { convertLegacyRouteRef } from '@backstage/core-compat-api';
import { rootCatalogKubernetesRouteRef } from '../plugin';
export const kubernetesPage = PageBlueprint.make({
@@ -28,6 +25,6 @@ export const kubernetesPage = PageBlueprint.make({
// by wrapping into the convertLegacyRouteRef.
routeRef: convertLegacyRouteRef(rootCatalogKubernetesRouteRef),
// these inputs usually match the props required by the component.
loader: () => import('../Router').then(m => compatWrapper(<m.Router />)),
loader: () => import('../Router').then(m => <m.Router />),
},
});