How to use the @commercetools-frontend/actions-global.showNotification function in @commercetools-frontend/actions-global

To help you get started, weā€™ve selected a few @commercetools-frontend/actions-global examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github commercetools / merchant-center-application-kit / packages / react-notifications / src / components / notifications-connector / notifications-connector.js View on Github external
notifications: PropTypes.array.isRequired,
  showNotification: PropTypes.func.isRequired,
  removeNotification: PropTypes.func.isRequired,
  showApiErrorNotification: PropTypes.func.isRequired,
  showUnexpectedErrorNotification: PropTypes.func.isRequired,
};
NotificationsFaC.displayName = 'NotificationsFaC';

const NotificationsConnector = connect(
  (state, ownProps) => {
    const notificationsByDomain = selectNotificationsByDomain(state);
    return { notifications: notificationsByDomain[ownProps.domain] };
  },
  {
    removeNotification,
    showNotification: globalActions.showNotification,
    showApiErrorNotification: globalActions.showApiErrorNotification,
    showUnexpectedErrorNotification:
      globalActions.showUnexpectedErrorNotification,
  }
)(NotificationsFaC);

export default NotificationsConnector;