@arkyn/components 1.3.147 → 1.3.148

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ImageUpload/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAQhD,OAAO,cAAc,CAAC;AAEtB,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA4F3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ImageUpload/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAQhD,OAAO,cAAc,CAAC;AAEtB,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA6F3C;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -18,6 +18,7 @@ function ImageUpload(props) {
18
18
  async function handleUploadImage(file) {
19
19
  setIsLoading(true);
20
20
  setFile(file);
21
+ setError("");
21
22
  const formData = new FormData();
22
23
  formData.append(fileName, file);
23
24
  await fetch(action, { method: method, body: formData })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/components",
3
- "version": "1.3.147",
3
+ "version": "1.3.148",
4
4
  "main": "./dist/bundle.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Lucas Gonçalves",
@@ -38,6 +38,7 @@ function ImageUpload(props: ImageUploadProps) {
38
38
  async function handleUploadImage(file: File) {
39
39
  setIsLoading(true);
40
40
  setFile(file);
41
+ setError("");
41
42
 
42
43
  const formData = new FormData();
43
44
  formData.append(fileName, file);