@commercetools-frontend/actions-global
Version:
Global redux actions for a MC application
16 lines (15 loc) • 771 B
TypeScript
import type { TApiErrorNotificationOptions } from '../types';
/**
* Dispatch an API error notification.
*
* @example
* const showApiErrorNotification = useShowApiErrorNotification();
* showApiErrorNotification({ errors });
*/
export default function useShowApiErrorNotification(): (options: TApiErrorNotificationOptions) => import("@commercetools-frontend/notifications").TAddNotificationAction<import("@commercetools-frontend/constants").TAppNotificationOfDomain & {
kind: import("@commercetools-frontend/constants").TAppNotificationKindPage;
} & {
id: number;
text?: undefined;
values?: import("@commercetools-frontend/constants").TAppNotificationValuesApiError<{}> | undefined;
} & import("@commercetools-frontend/notifications").TNotification>;