diff --git a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx index b0edcf217..8572eaefe 100644 --- a/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx +++ b/src/plugins/components/PluginAuthorization/PluginAuthorization.tsx @@ -3,7 +3,6 @@ import CardTitle from "@saleor/components/CardTitle"; import Hr from "@saleor/components/Hr"; import { ConfigurationItemFragment, - ConfigurationItemInput, ConfigurationTypeFieldEnum } from "@saleor/graphql"; import { buttonMessages } from "@saleor/intl"; @@ -13,7 +12,6 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; interface PluginAuthorizationProps { - data: ConfigurationItemInput[]; fields: ConfigurationItemFragment[]; onClear: (field: string) => void; onEdit: (field: string) => void; @@ -39,7 +37,7 @@ const useStyles = makeStyles( ); const PluginAuthorization: React.FC = props => { - const { data, fields, onClear, onEdit } = props; + const { fields, onClear, onEdit } = props; const classes = useStyles(props); const intl = useIntl(); @@ -57,53 +55,47 @@ const PluginAuthorization: React.FC = props => { })} /> - {secretFields.map((field, fieldIndex) => { - const inputData = data.find( - dataField => dataField.name === field.name - ); - - return ( - -
- {field.type === ConfigurationTypeFieldEnum.SECRET || - field.type === ConfigurationTypeFieldEnum.SECRETMULTILINE ? ( -
- {field.label} - {field.value !== null && ( - **** {inputData.value} - )} -
- ) : ( + {secretFields.map((field, fieldIndex) => ( + +
+ {field.type === ConfigurationTypeFieldEnum.SECRET || + field.type === ConfigurationTypeFieldEnum.SECRETMULTILINE ? ( +
{field.label} - )} -
- {field.value === null ? ( + {field.value !== null && ( + **** {field.value} + )} +
+ ) : ( + {field.label} + )} +
+ {field.value === null ? ( + + ) : ( + <> + - ) : ( - <> - - - - )} -
- {fieldIndex !== secretFields.length - 1 && ( -
+ )} - - ); - })} +
+ {fieldIndex !== secretFields.length - 1 && ( +
+ )} + + ))} ); diff --git a/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx b/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx index 6f96d18cf..7c9da1710 100644 --- a/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx +++ b/src/plugins/components/PluginsDetailsPage/PluginsDetailsPage.tsx @@ -142,7 +142,6 @@ const PluginsDetailsPage: React.FC = ({ <>