diff options
author | Stefan Malzner <stefan@adlk.io> | 2018-12-13 14:01:33 +0100 |
---|---|---|
committer | Stefan Malzner <stefan@adlk.io> | 2018-12-13 14:01:33 +0100 |
commit | b5937bd427e02d64b675c9c4719ec8148c68c224 (patch) | |
tree | 3e67ca01935eb36ab6d40a1e197d7c2c0f38b587 /src/components/ui/ImageUpload.js | |
parent | Update CHANGELOG.md (diff) | |
parent | Ignore clicks on premium elements (diff) | |
download | ferdium-app-b5937bd427e02d64b675c9c4719ec8148c68c224.tar.gz ferdium-app-b5937bd427e02d64b675c9c4719ec8148c68c224.tar.zst ferdium-app-b5937bd427e02d64b675c9c4719ec8148c68c224.zip |
Merge branch 'develop'v5.0.0-beta.21
Diffstat (limited to 'src/components/ui/ImageUpload.js')
-rw-r--r-- | src/components/ui/ImageUpload.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/ui/ImageUpload.js b/src/components/ui/ImageUpload.js index 76f77d631..83a05554b 100644 --- a/src/components/ui/ImageUpload.js +++ b/src/components/ui/ImageUpload.js | |||
@@ -1,4 +1,4 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component, Fragment } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { observer } from 'mobx-react'; | 3 | import { observer } from 'mobx-react'; |
4 | import { Field } from 'mobx-react-form'; | 4 | import { Field } from 'mobx-react-form'; |
@@ -23,6 +23,8 @@ export default @observer class ImageUpload extends Component { | |||
23 | path: null, | 23 | path: null, |
24 | } | 24 | } |
25 | 25 | ||
26 | dropzoneRef = null; | ||
27 | |||
26 | onDrop(acceptedFiles) { | 28 | onDrop(acceptedFiles) { |
27 | const { field } = this.props; | 29 | const { field } = this.props; |
28 | 30 | ||
@@ -36,8 +38,6 @@ export default @observer class ImageUpload extends Component { | |||
36 | field.set(''); | 38 | field.set(''); |
37 | } | 39 | } |
38 | 40 | ||
39 | dropzoneRef = null; | ||
40 | |||
41 | render() { | 41 | render() { |
42 | const { | 42 | const { |
43 | field, | 43 | field, |
@@ -57,7 +57,7 @@ export default @observer class ImageUpload extends Component { | |||
57 | <label className="franz-form__label" htmlFor="iconUpload">{field.label}</label> | 57 | <label className="franz-form__label" htmlFor="iconUpload">{field.label}</label> |
58 | <div className="image-upload"> | 58 | <div className="image-upload"> |
59 | {(field.value && field.value !== 'delete') || this.state.path ? ( | 59 | {(field.value && field.value !== 'delete') || this.state.path ? ( |
60 | <div> | 60 | <Fragment> |
61 | <div | 61 | <div |
62 | className="image-upload__preview" | 62 | className="image-upload__preview" |
63 | style={({ | 63 | style={({ |
@@ -84,7 +84,7 @@ export default @observer class ImageUpload extends Component { | |||
84 | </button> | 84 | </button> |
85 | <div className="image-upload__action-background" /> | 85 | <div className="image-upload__action-background" /> |
86 | </div> | 86 | </div> |
87 | </div> | 87 | </Fragment> |
88 | ) : ( | 88 | ) : ( |
89 | <Dropzone | 89 | <Dropzone |
90 | ref={(node) => { this.dropzoneRef = node; }} | 90 | ref={(node) => { this.dropzoneRef = node; }} |