Skip to content

Scheduling infrastructure for absolutely everyone.

fix: update toast type to ExternalToast in showToast function (#19650)

Nayan Bagale2d915a1c5114
diff --git a/packages/ui/components/toast/showToast.tsx b/packages/ui/components/toast/showToast.tsx
index 07da2aaf261..3db4ada2904 100644
--- a/packages/ui/components/toast/showToast.tsx
+++ b/packages/ui/components/toast/showToast.tsx
@@ -1,5 +1,5 @@
import classNames from "classnames";
-import type { ToastT } from "sonner";
+import type { ExternalToast } from "sonner";
import { toast } from "sonner";
import { Icon } from "../icon";
@@ -72,9 +72,9 @@ export function showToast(
message: string,
variant: ToastVariants,
// Options or duration (duration for backwards compatibility reasons)
- options: number | ToastT = TOAST_VISIBLE_DURATION
+ options: number | ExternalToast = TOAST_VISIBLE_DURATION
) {
- const _options: ToastT = typeof options === "number" ? { duration: options, id: "" } : options;
+ const _options: ExternalToast = typeof options === "number" ? { duration: options } : options;
if (!_options.duration) _options.duration = TOAST_VISIBLE_DURATION;
if (!_options.position) _options.position = "bottom-center";