@campxdev/shared 1.11.62 → 1.11.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.11.62",
3
+ "version": "1.11.63",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -11,6 +11,7 @@ export default function UploadDocument({
11
11
  postBody,
12
12
  styleProps,
13
13
  onSuccess,
14
+ onError,
14
15
  width,
15
16
  height,
16
17
  }: {
@@ -19,6 +20,7 @@ export default function UploadDocument({
19
20
  postUrl: string
20
21
  postBody?: object
21
22
  onSuccess?: (res: any) => void
23
+ onError?: (res: any) => void
22
24
  styleProps?: any
23
25
  width?: string
24
26
  height?: string
@@ -44,6 +46,7 @@ export default function UploadDocument({
44
46
  onSuccess(res?.data)
45
47
  })
46
48
  .catch((err) => {
49
+ onError && onError(err)
47
50
  setLoading(false)
48
51
  toast.error('Server Error While Uploading File')
49
52
  })