diff --git a/components/FileListing.tsx b/components/FileListing.tsx index b224e23..3fba704 100644 --- a/components/FileListing.tsx +++ b/components/FileListing.tsx @@ -262,7 +262,16 @@ const FileListing: FunctionComponent<{ query?: ParsedUrlQuery }> = ({ query }) = el.remove() } else if (files.length > 1) { setTotalGenerating(true) - saveFiles(files, folder).then(() => setTotalGenerating(false)) + const toastId = toast.loading('Downloading selected files. This may be slow...') + saveFiles(files, folder).then(() => { + setTotalGenerating(false) + toast.dismiss(toastId) + toast.success('Finished to download selected files.') + }).catch(() => { + setTotalGenerating(false) + toast.dismiss(toastId) + toast.error('Failed to download selected files.') + }) } }