v0.2.2.2 (#830)
This commit is contained in:
MartinNYHC
2026-03-27 09:27:47 +01:00
committed by GitHub
parent 8270030687
commit 67f91d94de
112 changed files with 18595 additions and 9993 deletions
+4 -1
View File
@@ -6,6 +6,8 @@ import { formatFileSize } from '../utils/file';
type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
type ShowPersistentToast = (id: string, message: string, type?: ToastType) => void;
interface Toast {
id: string;
message: string;
@@ -38,7 +40,7 @@ interface DispatchToastData {
interface ToastContextType {
showToast: (message: string, type?: ToastType) => void;
showPersistentToast: (id: string, message: string, type?: ToastType) => void;
showPersistentToast: ShowPersistentToast;
dismissToast: (id: string) => void;
}
@@ -460,6 +462,7 @@ export function ToastProvider({ children }: { children: ReactNode }) {
return () => window.removeEventListener('background-dispatch', onDispatchEvent);
}, [t]);
return (
<ToastContext.Provider value={{ showToast, showPersistentToast, dismissToast }}>
{children}