fix: add variant to watchlist toast type

This commit is contained in:
2026-06-16 17:25:15 +02:00
committed by Milas Holsting
parent ff24e85cd8
commit 1f159edf07

View File

@@ -54,9 +54,15 @@ class WatchlistStore {
const watchlistStore = new WatchlistStore(); const watchlistStore = new WatchlistStore();
const getShowToast = (): ((opts: { message: string; duration?: number }) => void) | null => { const getShowToast = ():
| ((opts: { message: string; duration?: number; variant?: "default" | "destructive" }) => void)
| null => {
const anyWindow = window as unknown as { const anyWindow = window as unknown as {
showToast?: (opts: { message: string; duration?: number }) => void; showToast?: (opts: {
message: string;
duration?: number;
variant?: "default" | "destructive";
}) => void;
}; };
return typeof anyWindow.showToast === "function" ? anyWindow.showToast : null; return typeof anyWindow.showToast === "function" ? anyWindow.showToast : null;
}; };