src: Fix new errors after linter bump
This addresses problems caused by dependency updates.
This commit is contained in:
parent
21d038f47b
commit
44dc900370
6 changed files with 41 additions and 20 deletions
|
|
@ -50,6 +50,7 @@ export const BuildImagesButton = () => {
|
|||
addNotification({
|
||||
variant: 'warning',
|
||||
title: 'No blueprint was build',
|
||||
description: imageBuildError?.data?.error?.message,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
@ -164,8 +165,9 @@ export const BuildImagesButtonEmptyState = ({
|
|||
const [buildBlueprint, { isLoading: imageBuildLoading }] =
|
||||
useComposeBlueprintMutation();
|
||||
const onBuildHandler = async () => {
|
||||
selectedBlueprintId &&
|
||||
(await buildBlueprint({ id: selectedBlueprintId, body: {} }));
|
||||
if (selectedBlueprintId) {
|
||||
await buildBlueprint({ id: selectedBlueprintId, body: {} });
|
||||
}
|
||||
};
|
||||
return (
|
||||
<Button
|
||||
|
|
|
|||
|
|
@ -13,8 +13,10 @@ import {
|
|||
Modal,
|
||||
ModalVariant,
|
||||
} from '@patternfly/react-core';
|
||||
import { addNotification } from '@redhat-cloud-services/frontend-components-notifications/redux';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import { useAppDispatch } from '../../store/hooks';
|
||||
import { BlueprintResponse } from '../../store/imageBuilderApi';
|
||||
import { wizardState } from '../../store/wizardSlice';
|
||||
import { resolveRelPath } from '../../Utilities/path';
|
||||
|
|
@ -38,6 +40,7 @@ export const ImportBlueprintModal: React.FunctionComponent<
|
|||
const [filename, setFilename] = React.useState('');
|
||||
const [isLoading, setIsLoading] = React.useState(false);
|
||||
const [isRejected, setIsRejected] = React.useState(false);
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const handleFileInputChange = (
|
||||
_event: React.ChangeEvent<HTMLInputElement> | React.DragEvent<HTMLElement>,
|
||||
|
|
@ -67,6 +70,13 @@ export const ImportBlueprintModal: React.FunctionComponent<
|
|||
setJsonContent(value);
|
||||
} catch (error) {
|
||||
setIsInvalidFormat(true);
|
||||
dispatch(
|
||||
addNotification({
|
||||
variant: 'warning',
|
||||
title: 'No blueprint was build',
|
||||
description: error?.data?.error?.message,
|
||||
})
|
||||
);
|
||||
}
|
||||
};
|
||||
const handleFileRejected = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue