We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f31a282 commit 8f4a726Copy full SHA for 8f4a726
src/Shared/Hooks/UseDownload/UseDownload.tsx
@@ -24,7 +24,7 @@ const useDownload = () => {
24
fileName,
25
showSuccessfulToast = true,
26
downloadSuccessToastContent = 'Downloaded Successfully',
27
- }: HandleDownloadProps) => {
+ }: HandleDownloadProps): Promise<Error | ServerErrors> => {
28
setIsDownloading(true)
29
if (showFilePreparingToast) {
30
toast.info(
@@ -70,10 +70,11 @@ const useDownload = () => {
70
throw new ServerErrors(jsonResponseError)
71
}
72
} catch (error) {
73
- showError(error)
74
setIsDownloading(false)
+ showError(error)
75
return error
76
77
+ setIsDownloading(false)
78
return null
79
80
0 commit comments