Update project with latest eslint rules
This commit is contained in:
@@ -30,7 +30,7 @@ import { Theme as MuiTheme } from '@rjsf/material-ui';
|
||||
import React, { useState } from 'react';
|
||||
|
||||
const Form = withTheme(MuiTheme);
|
||||
type Step = {
|
||||
type StepType = {
|
||||
schema: JSONSchema;
|
||||
label: string;
|
||||
} & Partial<Omit<FormProps<any>, 'schema'>>;
|
||||
@@ -39,7 +39,7 @@ type Props = {
|
||||
/**
|
||||
* Steps for the form, each contains label and form schema
|
||||
*/
|
||||
steps: Step[];
|
||||
steps: StepType[];
|
||||
formData: Record<string, any>;
|
||||
onChange: (e: IChangeEvent) => void;
|
||||
onReset: () => void;
|
||||
|
||||
@@ -92,8 +92,8 @@ export const TemplatePage = () => {
|
||||
);
|
||||
|
||||
const [jobId, setJobId] = useState<string | null>(null);
|
||||
const job = useJobPolling(jobId, async job => {
|
||||
if (!job.metadata.catalogInfoUrl) {
|
||||
const job = useJobPolling(jobId, async jobItem => {
|
||||
if (!jobItem.metadata.catalogInfoUrl) {
|
||||
errorApi.post(
|
||||
new Error(`No catalogInfoUrl returned from the scaffolder`),
|
||||
);
|
||||
@@ -103,7 +103,9 @@ export const TemplatePage = () => {
|
||||
try {
|
||||
const {
|
||||
entities: [createdEntity],
|
||||
} = await catalogApi.addLocation({ target: job.metadata.catalogInfoUrl });
|
||||
} = await catalogApi.addLocation({
|
||||
target: jobItem.metadata.catalogInfoUrl,
|
||||
});
|
||||
|
||||
const resolvedPath = generatePath(
|
||||
`/catalog/${entityRoute.path}`,
|
||||
@@ -122,8 +124,8 @@ export const TemplatePage = () => {
|
||||
|
||||
const handleCreate = async () => {
|
||||
try {
|
||||
const jobId = await scaffolderApi.scaffold(templateName, formState);
|
||||
setJobId(jobId);
|
||||
const Id = await scaffolderApi.scaffold(templateName, formState);
|
||||
setJobId(Id);
|
||||
setModalOpen(true);
|
||||
} catch (e) {
|
||||
errorApi.post(e);
|
||||
|
||||
Reference in New Issue
Block a user