mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
Merge branch 'main' into feature/compute
This commit is contained in:
commit
fff5699c67
@ -18,9 +18,15 @@ export default function FileInput({
|
||||
|
||||
return (
|
||||
<InputGroup>
|
||||
<input className={styles.input} {...props} type="url" />
|
||||
<input
|
||||
className={styles.input}
|
||||
{...props}
|
||||
type="url"
|
||||
onBlur={(e: React.SyntheticEvent) => handleButtonClick(e, field.value)}
|
||||
/>
|
||||
|
||||
<Button
|
||||
style="primary"
|
||||
size="small"
|
||||
onClick={(e: React.SyntheticEvent) => handleButtonClick(e, field.value)}
|
||||
disabled={
|
||||
|
@ -15,7 +15,9 @@ export const validationSchema: Yup.SchemaOf<MetadataPublishFormDataset> = Yup.ob
|
||||
symbol: Yup.string()
|
||||
})
|
||||
.required('Required'),
|
||||
files: Yup.array<FileMetadata>().required('Required').nullable(),
|
||||
files: Yup.array<FileMetadata>()
|
||||
.required('Enter a valid URL and click "ADD FILE"')
|
||||
.nullable(),
|
||||
description: Yup.string().min(10).required('Required'),
|
||||
timeout: Yup.string().required('Required'),
|
||||
access: Yup.string()
|
||||
|
@ -21,8 +21,29 @@ export async function fileinfo(
|
||||
return
|
||||
}
|
||||
if (!response.data[0] || !response.data[0].valid) {
|
||||
toast.error('Could not fetch file info. Please check URL and try again')
|
||||
toast.error(
|
||||
'The data file URL you entered apears to be invalid. Please check URL and try again',
|
||||
{
|
||||
autoClose: false,
|
||||
hideProgressBar: false,
|
||||
closeOnClick: true,
|
||||
pauseOnHover: true,
|
||||
draggable: true,
|
||||
progress: undefined
|
||||
}
|
||||
)
|
||||
return
|
||||
} else {
|
||||
toast.dismiss() // Remove any existing error message
|
||||
toast.success('Great! That dataset looks good 🐳', {
|
||||
position: 'bottom-right',
|
||||
autoClose: 5000,
|
||||
hideProgressBar: false,
|
||||
closeOnClick: true,
|
||||
pauseOnHover: true,
|
||||
draggable: true,
|
||||
progress: undefined
|
||||
})
|
||||
}
|
||||
|
||||
const { contentLength, contentType } = response.data[0]
|
||||
|
Loading…
Reference in New Issue
Block a user