mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Fix complexity issue
This commit is contained in:
parent
80955b9065
commit
ebcc316aa2
@ -17,10 +17,6 @@ export default function Credential(props: InputProps) {
|
|||||||
helpers.setValue(arrayInput)
|
helpers.setValue(arrayInput)
|
||||||
}, [arrayInput])
|
}, [arrayInput])
|
||||||
|
|
||||||
function handleChange(e: ChangeEvent<HTMLInputElement>) {
|
|
||||||
setValue(e.target.value)
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleDeleteChip(value: string) {
|
function handleDeleteChip(value: string) {
|
||||||
const newInput = arrayInput.filter((input) => input !== value)
|
const newInput = arrayInput.filter((input) => input !== value)
|
||||||
setArrayInput(newInput)
|
setArrayInput(newInput)
|
||||||
@ -48,7 +44,9 @@ export default function Credential(props: InputProps) {
|
|||||||
className={styles.input}
|
className={styles.input}
|
||||||
placeholder={props.placeholder}
|
placeholder={props.placeholder}
|
||||||
name="search"
|
name="search"
|
||||||
onChange={handleChange}
|
onChange={(e: ChangeEvent<HTMLInputElement>) =>
|
||||||
|
setValue(e.target.value)
|
||||||
|
}
|
||||||
value={value}
|
value={value}
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
|
@ -68,7 +68,7 @@ export default function EditAdvanceSettings({
|
|||||||
const { debug } = useUserPreferences()
|
const { debug } = useUserPreferences()
|
||||||
const { accountId } = useWeb3()
|
const { accountId } = useWeb3()
|
||||||
const { ocean } = useOcean()
|
const { ocean } = useOcean()
|
||||||
const { metadata, ddo, refreshDdo, price } = useAsset()
|
const { metadata, ddo, refreshDdo } = useAsset()
|
||||||
const [success, setSuccess] = useState<string>()
|
const [success, setSuccess] = useState<string>()
|
||||||
const [error, setError] = useState<string>()
|
const [error, setError] = useState<string>()
|
||||||
const { appConfig } = useSiteMetadata()
|
const { appConfig } = useSiteMetadata()
|
||||||
@ -121,7 +121,7 @@ export default function EditAdvanceSettings({
|
|||||||
await handleSubmit(values, resetForm)
|
await handleSubmit(values, resetForm)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{({ isSubmitting, values, initialValues }) =>
|
{({ isSubmitting, values }) =>
|
||||||
isSubmitting || hasFeedback ? (
|
isSubmitting || hasFeedback ? (
|
||||||
<MetadataFeedback
|
<MetadataFeedback
|
||||||
title="Updating Data Set"
|
title="Updating Data Set"
|
||||||
|
Loading…
Reference in New Issue
Block a user