export const GLOBAL_ACTION_LOADING_START = "global-action-loading-start"; export const GLOBAL_ACTION_LOADING_STOP = "global-action-loading-stop"; export function startActionLoading() { if (typeof window !== "undefined") { window.dispatchEvent(new Event(GLOBAL_ACTION_LOADING_START)); } } export function stopActionLoading() { if (typeof window !== "undefined") { window.dispatchEvent(new Event(GLOBAL_ACTION_LOADING_STOP)); } }