Skip to content

Commit

Permalink
downloadbtn
Browse files Browse the repository at this point in the history
  • Loading branch information
skamril committed Sep 15, 2024
1 parent ac0af1e commit 4aa068a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/src/components/common/buttons/DownloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import useEnqueueErrorSnackbar from "../../../hooks/useEnqueueErrorSnackbar";
import { useTranslation } from "react-i18next";
import type { PromiseAny } from "../../../utils/tsUtils";
import { LoadingButton } from "@mui/lab";
import { toError } from "../../../utils/fnUtils";

export type DownloadButtonProps<OptionValue extends string> = {
children?: React.ReactNode;
Expand Down Expand Up @@ -59,7 +60,7 @@ function DownloadButton<OptionValue extends string>(
await onClick?.();
}
} catch (err) {
enqueueErrorSnackbar(t("global.download.error"), String(err));
enqueueErrorSnackbar(t("global.export.error"), toError(err));
}

setIsDownloading(false);
Expand Down

0 comments on commit 4aa068a

Please sign in to comment.