diff --git a/libs/ui-lib/lib/common/components/clusterConfiguration/SecurityFields.tsx b/libs/ui-lib/lib/common/components/clusterConfiguration/SecurityFields.tsx index 7ad62be2e9..883eef3193 100644 --- a/libs/ui-lib/lib/common/components/clusterConfiguration/SecurityFields.tsx +++ b/libs/ui-lib/lib/common/components/clusterConfiguration/SecurityFields.tsx @@ -1,12 +1,6 @@ import * as React from 'react'; import { useFormikContext } from 'formik'; -import { - Checkbox, - FormGroup, - FormHelperText, - HelperText, - HelperTextItem, -} from '@patternfly/react-core'; +import { Checkbox, FormGroup, HelperText, HelperTextItem } from '@patternfly/react-core'; import { RenderIf } from '../ui/RenderIf'; import { getFieldId, TextAreaField, trimSshPublicKey, ExternalLink } from '../ui'; @@ -46,11 +40,9 @@ const SecurityFields = ({ //clusterSshKey updating causes the textarea to disappear when the user clears it to edit it const defaultShareSshKey = !!imageSshKey && (clusterSshKey === imageSshKey || !clusterSshKey); const [shareSshKey, setShareSshKey] = React.useState(defaultShareSshKey); - const { values, setFieldValue, errors, touched } = + const { values, setFieldValue } = useFormikContext>(); - const errorMsg = errors.sshPublicKey; - const handleSshKeyBlur = () => { if (values.sshPublicKey) { setFieldValue('sshPublicKey', trimSshPublicKey(values.sshPublicKey)); @@ -90,18 +82,6 @@ const SecurityFields = ({ isDisabled={isDisabled} /> - {errorMsg && ( - - - - {errorMsg ? errorMsg : ''} - - - - )} );