mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-14 09:14:52 +01:00
Allowing urls without proceeding http or https (#493)
* allowing urls without proceeding http or https * Installing package: valid-url-utf8 * removing pre-submit URL validation * removing new package * updating package-lock.json
This commit is contained in:
parent
67cdd62718
commit
2826df8287
7
package-lock.json
generated
7
package-lock.json
generated
@ -16704,7 +16704,7 @@
|
||||
}
|
||||
},
|
||||
"ethereumjs-abi": {
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1ce6a1d64235fabe2aaf827fd606def55693508f",
|
||||
"version": "git+https://github.com/ethereumjs/ethereumjs-abi.git#1a27c59c15ab1e95ee8e5c4ed6ad814c49cc439e",
|
||||
"from": "git+https://github.com/ethereumjs/ethereumjs-abi.git",
|
||||
"requires": {
|
||||
"bn.js": "^4.11.8",
|
||||
@ -22312,11 +22312,6 @@
|
||||
"resolved": "https://registry.npmjs.org/is-url/-/is-url-1.2.4.tgz",
|
||||
"integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww=="
|
||||
},
|
||||
"is-url-superb": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-url-superb/-/is-url-superb-5.0.0.tgz",
|
||||
"integrity": "sha512-jGkG59ra7/JlcV8ap3dsc0M79IgpuFU/obfsSf6X5D0z1NVvFTFuzt4ob7nfBTZEPbTwjGXVKNQDfWfPghapKQ=="
|
||||
},
|
||||
"is-utf8": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
||||
|
@ -62,7 +62,6 @@
|
||||
"gatsby-transformer-remark": "^2.14.0",
|
||||
"gatsby-transformer-sharp": "^2.10.1",
|
||||
"intersection-observer": "^0.12.0",
|
||||
"is-url-superb": "^5.0.0",
|
||||
"jwt-decode": "^3.1.2",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.omit": "^4.5.0",
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React, { ReactElement } from 'react'
|
||||
import isUrl from 'is-url-superb'
|
||||
import Button from '../../../atoms/Button'
|
||||
import { FieldInputProps, useField } from 'formik'
|
||||
import Loader from '../../../atoms/Loader'
|
||||
@ -29,11 +28,7 @@ export default function FileInput({
|
||||
style="primary"
|
||||
size="small"
|
||||
onClick={(e: React.SyntheticEvent) => handleButtonClick(e, field.value)}
|
||||
disabled={
|
||||
!field.value ||
|
||||
// weird static page build fix so is-url-superb won't error
|
||||
!isUrl(typeof field.value === 'string' ? field.value : '')
|
||||
}
|
||||
disabled={!field.value}
|
||||
>
|
||||
{isLoading ? <Loader /> : 'Add File'}
|
||||
</Button>
|
||||
|
Loading…
Reference in New Issue
Block a user