How to use the react-redux-toastr.toastr.warning function in react-redux-toastr

To help you get started, we’ve selected a few react-redux-toastr 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 dlinknctu / OpenADM / ui / src / js / middlewares / socket.js View on Github external
export const socketIoMiddleware = store => next => action => {
  const result = next(action);

  if (action.type === 'CONNECT_SOCKET') {
    createSocket(store, (action.payload ?
      action.payload.coreURL : store.getState().setting.coreURL
    ));
  }
  if (!socket) {
    toastr.warning('websocket', "socket doesn't inital");
    return result;
  }

  if (SendActions.indexOf(action.type) > -1) {
    if (!socket.connected && action.type !== 'SETTING_CONTROLLER') {
      toastr.warning('websocket', 'Not connected');
      return result;
    }
    socket.emit(action.type, {
      data: action.payload,
    });
  }

  return result;
};
github dlinknctu / OpenADM / ui / src / js / middlewares / socket.js View on Github external
const matchResponseForNotify = (actionName, payload) => {
  if (!actionName.match(notifyRule)) {
    return;
  }
  if (payload.status !== 'OK') {
    toastr.warning(actionName.toLowerCase().replace(/_/g, ' '), payload.message);
  } else {
    toastr.success(actionName.toLowerCase().replace(/_/g, ' '), payload.message);
  }
};
github go-faast / faast-web / src / app / components / AssetSelector / index.jsx View on Github external
handleSelect (asset) {
    const { selectAsset } = this.props
    if (asset.disabled) {
      return toastr.warning('INVALID', `Cannot add ${asset.name}: ${asset.disabledMessage}`)
    }
    selectAsset(asset)
  }
github resource-watch / resource-watch / components / modal / EmbedLayerModal.js View on Github external
onCopyClick() {
    const copyTextarea = this.input;
    copyTextarea.select();

    try {
      document.execCommand('copy');
      this.setState({ copied: true });
    } catch (err) {
      toastr.warning('Oops, unable to copy');
    }
  }
github resource-watch / resource-watch / components / widgets / editor / modal / ShareModalExplore.js View on Github external
onCopyClick(input) {
    const copyTextarea = (input === 'embed') ? this.embedInput : this.input;
    copyTextarea.select();

    try {
      document.execCommand('copy');
      this.setState({ copied: true });
    } catch (err) {
      toastr.warning('Oops, unable to copy');
    }

    if (input === 'url') {
      logEvent('Share', 'Share a map from explore page', 'Copy link');
    }
  }

react-redux-toastr

react-redux-toastr is a React toastr message implemented with Redux

MIT
Latest version published 10 months ago

Package Health Score

64 / 100
Full package analysis