fixes the comonent types
Signed-off-by: Brian Fletcher <brian@roadie.io>
This commit is contained in:
@@ -21,10 +21,8 @@ import { FieldValidation } from '@rjsf/core';
|
||||
import { IconButton } from '@material-ui/core';
|
||||
import { JsonObject } from '@backstage/types';
|
||||
import { JSONSchema } from '@backstage/catalog-model';
|
||||
import { JSXElementConstructor } from 'react';
|
||||
import { Observable } from '@backstage/types';
|
||||
import { default as React_2 } from 'react';
|
||||
import { ReactElement } from 'react';
|
||||
import { ReactNode } from 'react';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
@@ -255,9 +253,7 @@ export const ScaffolderPage: ({
|
||||
template: TemplateEntityV1beta2;
|
||||
}>
|
||||
| undefined;
|
||||
TaskPageComponent?:
|
||||
| ReactElement<any, string | JSXElementConstructor<any>>
|
||||
| undefined;
|
||||
TaskPageComponent?: ComponentType<{}> | undefined;
|
||||
groups?:
|
||||
| {
|
||||
title?: string | undefined;
|
||||
|
||||
@@ -34,7 +34,7 @@ type RouterProps = {
|
||||
TemplateCardComponent?:
|
||||
| ComponentType<{ template: TemplateEntityV1beta2 }>
|
||||
| undefined;
|
||||
TaskPageComponent?: React.ReactElement | undefined;
|
||||
TaskPageComponent?: ComponentType<{}> | undefined;
|
||||
groups?: Array<{
|
||||
title?: string;
|
||||
titleComponent?: React.ReactNode;
|
||||
@@ -48,7 +48,7 @@ export const Router = ({
|
||||
groups,
|
||||
}: RouterProps) => {
|
||||
const outlet = useOutlet();
|
||||
const TaskPageElement = TaskPageComponent || <TaskPage />;
|
||||
const TaskPageElement = TaskPageComponent || TaskPage;
|
||||
|
||||
const customFieldExtensions = useElementFilter(outlet, elements =>
|
||||
elements
|
||||
@@ -85,7 +85,7 @@ export const Router = ({
|
||||
path="/templates/:templateName"
|
||||
element={<TemplatePage customFieldExtensions={fieldExtensions} />}
|
||||
/>
|
||||
<Route path="/tasks/:taskId" element={TaskPageElement} />
|
||||
<Route path="/tasks/:taskId" element={<TaskPageElement />} />
|
||||
<Route path="/actions" element={<ActionsPage />} />
|
||||
</Routes>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user