1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00

use actual empty array

This commit is contained in:
Matthias Kretschmann 2019-02-13 12:19:45 +01:00
parent 03af2e217c
commit f8405c8e5a
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -38,13 +38,13 @@ class Publish extends Component<{}, PublishState> {
name: '', name: '',
dateCreated: new Date(), dateCreated: new Date(),
description: '', description: '',
files: [''], files: [],
price: 0, price: 0,
author: '', author: '',
type: 'dataset' as AssetType, type: 'dataset' as AssetType,
license: '', license: '',
copyrightHolder: '', copyrightHolder: '',
categories: [''], categories: []
isPublishing: false, isPublishing: false,
isPublished: false, isPublished: false,
publishedDid: '', publishedDid: '',
@ -60,11 +60,6 @@ class Publish extends Component<{}, PublishState> {
} }
if (key === 'files') { if (key === 'files') {
const filesArray =
this.state.files[0] === ''
? this.state.files.splice(1, 1)
: this.state.files
return ( return (
<Row key={key}> <Row key={key}>
<Label htmlFor={key} required> <Label htmlFor={key} required>
@ -73,7 +68,7 @@ class Publish extends Component<{}, PublishState> {
<Files <Files
placeholder={value.placeholder} placeholder={value.placeholder}
help={value.help} help={value.help}
files={filesArray} files={this.state.files}
/> />
</Row> </Row>
) )