fix: react-doctor deslop/unused-export 7→0, prefer-module-scope-pure-function 6→0 (hoist handleExportCSV, downloadCSV, triggerDownload, scrollToContent, handleLogout, applyMappings)
This commit is contained in:
@@ -9,8 +9,6 @@ import {
|
||||
type Toast,
|
||||
} from "./toast-store";
|
||||
|
||||
export { toast } from "./toast-store";
|
||||
|
||||
interface ToastNotificationProps {
|
||||
toast: Toast;
|
||||
onDismiss: (id: string) => void;
|
||||
|
||||
@@ -19,13 +19,6 @@ function emit(type: ToastType, title: string, message?: string) {
|
||||
toastListeners.forEach((listener) => listener(newToast));
|
||||
}
|
||||
|
||||
export const toast = {
|
||||
success: (title: string, message?: string) => emit("success", title, message),
|
||||
error: (title: string, message?: string) => emit("error", title, message),
|
||||
warning: (title: string, message?: string) => emit("warning", title, message),
|
||||
info: (title: string, message?: string) => emit("info", title, message),
|
||||
};
|
||||
|
||||
/** Internal subscription helper used by `ToastNotification` to receive
|
||||
* newly-fired toasts. Returns an unsubscribe function. */
|
||||
export function subscribeToToasts(listener: (toast: Toast) => void): () => void {
|
||||
|
||||
Reference in New Issue
Block a user