File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/Shared/Hooks/UseDownload Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -42,17 +42,17 @@ const useDownload = () => {
42
42
downloadSuccessToastContent = 'Downloaded Successfully' ,
43
43
} : HandleDownloadProps ) : Promise < Error | ServerErrors > => {
44
44
setIsDownloading ( true )
45
- if ( showFilePreparingToast ) {
46
- toast . info (
47
- < ToastBody
48
- title = "Preparing file for download"
49
- subtitle = "File will be downloaded when it is available."
50
- /> ,
51
- )
52
- }
53
45
try {
54
46
const response = await getDownloadResponse ( downloadUrl )
55
47
if ( response . status === API_STATUS_CODES . OK ) {
48
+ if ( showFilePreparingToast ) {
49
+ toast . info (
50
+ < ToastBody
51
+ title = "Preparing file for download"
52
+ subtitle = "File will be downloaded when it is available."
53
+ /> ,
54
+ )
55
+ }
56
56
const data = await ( response as any ) . blob ( )
57
57
58
58
// Create a new URL object
You can’t perform that action at this time.
0 commit comments