always show metadata inputs on update

This commit is contained in:
Travis Eden 2018-10-16 11:56:17 -04:00
parent 5747245e64
commit 41cc6f5118
2 changed files with 11 additions and 7 deletions

View file

@ -8,6 +8,7 @@ const mapStateToProps = ({ publish }) => {
description : publish.metadata.description,
license : publish.metadata.license,
nsfw : publish.metadata.nsfw,
isUpdate : publish.isUpdate,
};
};

View file

@ -26,27 +26,30 @@ class PublishMetadataInputs extends React.Component {
this.props.onMetadataChange(name, selectedOption);
}
render () {
const { showMetadataInputs, description, isUpdate, nsfw } = this.props;
return (
<div>
{this.props.showMetadataInputs && (
{(showMetadataInputs || isUpdate) && (
<div>
<PublishDescriptionInput
description={this.props.description}
description={description}
handleInput={this.handleInput}
/>
<PublishLicenseInput
handleSelect={this.handleSelect}
/>
<PublishNsfwInput
nsfw={this.props.nsfw}
nsfw={nsfw}
handleInput={this.handleInput}
/>
</div>
)}
<ButtonSecondary
value={this.props.showMetadataInputs ? 'less' : 'more'}
onClickHandler={this.toggleShowInputs}
/>
{!isUpdate && (
<ButtonSecondary
value={showMetadataInputs ? 'less' : 'more'}
onClickHandler={this.toggleShowInputs}
/>
)}
</div>
);
}