1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 13:59:40 +02:00

fix(app): fix wording and 2 key validation [EE-6233] (#10944)

Co-authored-by: testa113 <testa113>
This commit is contained in:
Ali 2024-01-15 11:01:48 +13:00 committed by GitHub
parent 55f66f161e
commit cb7efd8601
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 21 additions and 21 deletions

View file

@ -7,7 +7,7 @@ import { Button } from '@@/buttons';
import { FormError } from '@@/form-components/FormError';
import { isArrayErrorType } from '@@/form-components/formikUtils';
import { ConfigurationOverrideKey } from './types';
import { ConfigurationOverrideKey, ConfigurationType } from './types';
type Props = {
value: ConfigurationOverrideKey;
@ -18,7 +18,7 @@ type Props = {
| string
| string[]
| FormikErrors<ConfigurationOverrideKey>[];
dataCyType: 'config' | 'secret';
configurationType: ConfigurationType;
};
export function ConfigurationData({
@ -27,8 +27,10 @@ export function ConfigurationData({
overrideKeysErrors,
configurationIndex,
keyIndex,
dataCyType,
configurationType,
}: Props) {
const dataCyType = configurationType.toLowerCase();
// rule out the error (from formik) being of type string
const overriddenKeyError = isArrayErrorType(overrideKeysErrors)
? overrideKeysErrors[keyIndex]