1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix config = undefined error in advanced publish settings (#915)

This commit is contained in:
Moritz Kirstein 2021-10-13 11:35:15 +02:00 committed by GitHub
parent f4746e8a77
commit 0698c26440
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 16 deletions

View File

@ -33,21 +33,21 @@ export default function AdvancedSettings(prop: {
Advanced Settings
</Button>
)}
{prop.content.data.map(
(field: FormFieldProps) =>
advancedSettings === true &&
field.advanced === true && (
<Field
key={field.name}
{...field}
options={field.options}
component={Input}
onChange={(e: ChangeEvent<HTMLInputElement>) =>
prop.handleFieldChange(e, field)
}
/>
)
)}
{advancedSettings === true &&
prop.content.data.map(
(field: FormFieldProps) =>
field.advanced === true && (
<Field
key={field.name}
{...field}
options={field.options}
component={Input}
onChange={(e: ChangeEvent<HTMLInputElement>) =>
prop.handleFieldChange(e, field)
}
/>
)
)}
</>
)
}

View File

@ -36,7 +36,7 @@ export default function CustomProvider(props: InputProps): ReactElement {
useEffect(() => {
loadProvider()
}, [providerUrl, config.providerUri])
}, [providerUrl, config?.providerUri])
async function handleButtonClick(e: React.SyntheticEvent, url: string) {
helpers.setTouched(false)