Fix bug where images can't be reselected

Signed-off-by: Lucian <lucian.buzzo@gmail.com>
This commit is contained in:
Lucian 2019-12-04 12:39:01 +00:00 committed by Lorenzo Alberto Maria Ambrosi
parent 996c2b55a4
commit b6fb44d6a5

View File

@ -118,6 +118,7 @@ class ImageSelector extends React.Component {
}
reselectImage () {
console.log('reselecting image')
analytics.logEvent('Reselect image', {
previousImage: selectionState.getImage(),
applicationSessionUuid: store.getState().toJS().applicationSessionUuid,
@ -299,13 +300,15 @@ class ImageSelector extends React.Component {
return (
<ThemedProvider>
<Dropzone multiple={false} noClick onDrop={this.handleOnDrop}>
<div className="box text-center relative">
<Dropzone multiple={false} onDrop={this.handleOnDrop}>
{({ getRootProps, getInputProps }) => (
<div className="box text-center relative" {...getRootProps()}>
<div className="center-block" {...getRootProps()}>
<input {...getInputProps()} />
<div className="center-block">
<SVGIcon contents={selectionState.getImageLogo()} paths={[ '../../assets/image.svg' ]} />
</div>
)}
</Dropzone>
<div className="space-vertical-large">
{hasImage ? (
@ -350,8 +353,6 @@ class ImageSelector extends React.Component {
)}
</div>
</div>
)}
</Dropzone>
{Boolean(this.state.warning) && (
<Modal