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:
Nora
2026-06-26 06:24:02 -06:00
parent adce211480
commit 9633680e23
13 changed files with 145 additions and 240 deletions
@@ -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 {