diff options
author | Markus Hatvan <markus_hatvan@aon.at> | 2021-09-13 14:45:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-13 14:45:46 +0200 |
commit | 537697a6e9757f118d09d9e76362ba1ff617e2c6 (patch) | |
tree | bc55447115e385137684e84697a8c15d2199b8d5 /src/components/ui/ImageUpload.js | |
parent | Bumped up version to: 5.6.3-nightly.0 [skip ci] (diff) | |
download | ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.gz ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.tar.zst ferdium-app-537697a6e9757f118d09d9e76362ba1ff617e2c6.zip |
chore: upgrade intl dependencies (#1920)
Diffstat (limited to 'src/components/ui/ImageUpload.js')
-rw-r--r-- | src/components/ui/ImageUpload.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/components/ui/ImageUpload.js b/src/components/ui/ImageUpload.js index bb4ea0565..8ea31ca40 100644 --- a/src/components/ui/ImageUpload.js +++ b/src/components/ui/ImageUpload.js | |||
@@ -6,7 +6,8 @@ import classnames from 'classnames'; | |||
6 | import Dropzone from 'react-dropzone'; | 6 | import Dropzone from 'react-dropzone'; |
7 | import { isWindows } from '../../environment'; | 7 | import { isWindows } from '../../environment'; |
8 | 8 | ||
9 | export default @observer class ImageUpload extends Component { | 9 | @observer |
10 | class ImageUpload extends Component { | ||
10 | static propTypes = { | 11 | static propTypes = { |
11 | field: PropTypes.instanceOf(Field).isRequired, | 12 | field: PropTypes.instanceOf(Field).isRequired, |
12 | className: PropTypes.string, | 13 | className: PropTypes.string, |
@@ -29,7 +30,7 @@ export default @observer class ImageUpload extends Component { | |||
29 | onDrop(acceptedFiles) { | 30 | onDrop(acceptedFiles) { |
30 | const { field } = this.props; | 31 | const { field } = this.props; |
31 | 32 | ||
32 | acceptedFiles.forEach((file) => { | 33 | acceptedFiles.forEach(file => { |
33 | const imgPath = isWindows ? file.path.replace(/\\/g, '/') : file.path; | 34 | const imgPath = isWindows ? file.path.replace(/\\/g, '/') : file.path; |
34 | this.setState({ | 35 | this.setState({ |
35 | path: imgPath, | 36 | path: imgPath, |
@@ -42,9 +43,7 @@ export default @observer class ImageUpload extends Component { | |||
42 | } | 43 | } |
43 | 44 | ||
44 | render() { | 45 | render() { |
45 | const { | 46 | const { field, className, multiple, textDelete, textUpload } = this.props; |
46 | field, className, multiple, textDelete, textUpload, | ||
47 | } = this.props; | ||
48 | 47 | ||
49 | const cssClasses = classnames({ | 48 | const cssClasses = classnames({ |
50 | 'image-upload__dropzone': true, | 49 | 'image-upload__dropzone': true, |
@@ -86,7 +85,7 @@ export default @observer class ImageUpload extends Component { | |||
86 | </> | 85 | </> |
87 | ) : ( | 86 | ) : ( |
88 | <Dropzone | 87 | <Dropzone |
89 | ref={(node) => { | 88 | ref={node => { |
90 | this.dropzoneRef = node; | 89 | this.dropzoneRef = node; |
91 | }} | 90 | }} |
92 | onDrop={this.onDrop.bind(this)} | 91 | onDrop={this.onDrop.bind(this)} |
@@ -107,3 +106,5 @@ export default @observer class ImageUpload extends Component { | |||
107 | ); | 106 | ); |
108 | } | 107 | } |
109 | } | 108 | } |
109 | |||
110 | export default ImageUpload; | ||