diff --git a/apps/dashboard/src/components/export-status.tsx b/apps/dashboard/src/components/export-status.tsx index 5a7a4357d9..592c397f9a 100644 --- a/apps/dashboard/src/components/export-status.tsx +++ b/apps/dashboard/src/components/export-status.tsx @@ -57,13 +57,13 @@ export function ExportStatus() { }, }); - const handleOnDownload = (id: string) => { - dismiss(id); + const handleOnDownload = () => { + dismiss(toastId); }; - const handleOnShare = ({ id, expireIn, filename }) => { + const handleOnShare = ({ expireIn, filename }) => { shareFile.execute({ expireIn, filepath: `exports/${filename}` }); - dismiss(id); + dismiss(toastId); }; useEffect(() => { @@ -72,7 +72,7 @@ export function ExportStatus() { title: "Exporting transactions.", variant: "progress", description: "Please do not close browser until completed", - duration: 8000, + duration: Number.POSITIVE_INFINITY, progress: 0, }); @@ -84,10 +84,10 @@ export function ExportStatus() { } if (status?.data?.progress === 100) { - const { id } = toast({ + update(toastId, { title: "Export completed", description: `Your export is ready based on ${status?.data?.totalItems} transactions. It's stored in your Vault.`, - duration: Number.POSITIVE_INFINITY, + variant: "success", footer: (