mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Attempt fix issue
This commit is contained in:
parent
0c1dea91b6
commit
e3d916fe61
@ -27,19 +27,25 @@ export default function Credential(props: InputProps) {
|
||||
helpers.setValue(newInput)
|
||||
}
|
||||
|
||||
function handleAddValue(e: FormEvent<HTMLButtonElement>) {
|
||||
e.preventDefault()
|
||||
function isCredentialValid(): boolean {
|
||||
if (!isAddress(value)) {
|
||||
toast.error('Wallet address is invalid')
|
||||
return
|
||||
return false
|
||||
}
|
||||
if (arrayInput.includes(value)) {
|
||||
toast.error('Wallet address already added into list')
|
||||
return
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
function handleAddValue(e: FormEvent<HTMLButtonElement>) {
|
||||
e.preventDefault()
|
||||
if (isCredentialValid()) {
|
||||
setArrayInput((arrayInput) => [...arrayInput, value])
|
||||
setValue('')
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.credential}>
|
||||
|
@ -123,7 +123,7 @@ export default function EditAdvanceSettings({
|
||||
{({ isSubmitting, values, initialValues }) =>
|
||||
isSubmitting || hasFeedback ? (
|
||||
<MetadataFeedback
|
||||
title="Updating Data Set"
|
||||
title="Updating Advance Settings"
|
||||
error={error}
|
||||
success={success}
|
||||
setError={setError}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React, { ChangeEvent, ReactElement } from 'react'
|
||||
import styles from './FormEditMetadata.module.css' // TODO
|
||||
import styles from './FormEditMetadata.module.css'
|
||||
import { Field, Form, FormikContextType, useFormikContext } from 'formik'
|
||||
import Button from '../../../atoms/Button'
|
||||
import Input from '../../../atoms/Input'
|
||||
|
Loading…
Reference in New Issue
Block a user