How to use the antd.message.info function in antd

To help you get started, we’ve selected a few antd 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 dhruv-kumar-jha / productivity-frontend / src / global / middleware / networkInterface.js View on Github external
.then( res => {
				// console.log('applyAfterware res',res);
				// else if ( res.data.publicBoard == null ) {
				// 	next();
				// }

				if ( res.code === 401 || res.code === 403 ) {
					// unauthorized, logout and redirect to login page
					if ( window.location.pathname != '/auth/logout' ) {
						message.info( translate('global.token.expired') );
						browserHistory.push('/auth/logout');
					}
				}
				else if ( res.errors && res.errors.length > 0 ) {
					if ( res.errors[0].path === '_id' ) {
						message.warning( translate('global.record.empty') );
						browserHistory.push('/dashboard');
					}
					else { next(); }
				}
				else {
					next();
				}
			});
github ouxu / NEUQ-OJ / app / src / components / content / Problems / ProblemDetail / index.js View on Github external
resultDataUp: aUnPassed
              })
              this.setState({
                submit: true,
                resultCode: result_code,
                unsubmit: false,
              })
            }
            this.setState({
              resultCode: result_code,
              unsubmit: false
            })
          }
          if (solution && solution['result_code'] === -1) {
            timers && clearInterval(timers)
            message.info('题目未上传')
            this.setState({
              unsubmit: false
            })
          }
          if (solution && solution['result_code'] === -2) {
            message.info('正在判题....')
          }
          if (solution && solution['result_code'] === -3) {
            message.info('服务器异常')
            timers && clearInterval(timers)
          }
          if (count >= Count) {
            timers && clearInterval(timers)
            console.log('时间到了,定时器被清除啦')
            if (!solution) {
              message.error('当前排队人数太多,请重新提交')
github netless-io / netless-rtc-react-whiteboard / src / components / whiteboard / WhiteboardRecord.tsx View on Github external
});
            await this.recrod.acquire();
        }
        if (this.state.isRecord) {
            try {
                if (isMediaRun) {
                    const resp = await this.recrod.query();
                    if (resp.serverResponse.fileList) {
                        const res = await this.recrod.stop();
                        this.props.setMediaSource(res.serverResponse.fileList);
                        message.info("结束录制");
                        const time =  new Date();
                        this.props.setStopTime(time.getTime());
                        this.setState({isRecord: false});
                    } else {
                        message.info("录制时间过短");
                    }
                } else {
                    message.info("结束录制");
                    const time =  new Date();
                    this.props.setStopTime(time.getTime());
                    this.setState({isRecord: false});
                }
            } catch (err) {
                console.log(err);
            }
        } else {
            if (isMediaRun) {
                try {
                    await this.recrod.start();
                    message.success("开始录制");
                    const time =  new Date();
github netless-io / netless-rtc-react-whiteboard / src / components / whiteboard / WhiteboardRecord.tsx View on Github external
if (this.state.isRecord) {
            try {
                if (isMediaRun) {
                    const resp = await this.recrod.query();
                    if (resp.serverResponse.fileList) {
                        const res = await this.recrod.stop();
                        this.props.setMediaSource(res.serverResponse.fileList);
                        message.info("结束录制");
                        const time =  new Date();
                        this.props.setStopTime(time.getTime());
                        this.setState({isRecord: false});
                    } else {
                        message.info("录制时间过短");
                    }
                } else {
                    message.info("结束录制");
                    const time =  new Date();
                    this.props.setStopTime(time.getTime());
                    this.setState({isRecord: false});
                }
            } catch (err) {
                console.log(err);
            }
        } else {
            if (isMediaRun) {
                try {
                    await this.recrod.start();
                    message.success("开始录制");
                    const time =  new Date();
                    this.props.setStartTime(time.getTime());
                    this.setState({isRecord: true });
                } catch (err) {
github FleyX / bookmark / front / src / pages / userSpace / components / UserInfo / index.jsx View on Github external
message.error("两次密码不一致");
      return;
    }
    if ((itemKey === "password" || itemKey === "email") && actionId == null) {
      message.warning("敏感操作,需校验密码");
      this.setState({
        isModelShow: true,
        currentAction: itemKey,
        currentShowKey: isShowKey
      });
      return;
    }
    try {
      if (itemKey === "password") {
        await httpUtil.post("/baseInfo/password", { actionId, password });
        message.info("密码更新成功");
      } else if (itemKey === "email") {
        await httpUtil.post("/baseInfo/email", { actionId, email });
        this.props.updateOne("newEmail", email);
        message.info("新邮箱验证邮件已发送,请注意查收");
      } else {
        await httpUtil.post("/baseInfo/username", { username });
        this.props.updateOne("username", username);
      }
      this.setState({ [isShowKey]: false });
    } finally {
      this.setState({ actionId: null });
    }
  }
github wfh45678 / radar / webapp / src / component / preItem / PreItem.jsx View on Github external
(data) => {
                message.info('删除成功!');
                this.fetchTableData();
            });
    }
github didilinkin / react-admin-antd / src / views / DeviceMaintain / pages / PlumbingPipeline.jsx View on Github external
abnormal = async (id, type) => {
        let resulData = await apiPost('/deviceMaintain/electricalErrorDevice',
            {parentId: id,
                parentType: type})
        if (resulData.data !== null) {
            window.location.href = '/deviceMaintain/electricalErrorDevice/' + id + ',11'
        } else {
            message.info('无异常信息')
        }
    }
    refresh = async () => {
github didilinkin / react-admin-antd / src / views / DeviceMaintain / pages / FirePump.jsx View on Github external
abnormal = async (id, type) => {
        let resulData = await apiPost('/deviceMaintain/electricalErrorDevice',
            {parentId: id,
                parentType: type})
        if (resulData.data !== null) {
            window.location.href = '/deviceMaintain/electricalErrorDevice/' + id + ',10'
        } else {
            message.info('无异常信息')
        }
    }
    refresh = async () => {
github esteemapp / esteem-surfer / app / components / dialogs / PinConfirm.js View on Github external
setTimeout(() => {
      actions.wipePin();
      removeItem('pin-code');
      actions.logOut();
      actions.deleteAccounts();
      onInvalidate();
      message.info(intl.formatMessage({ id: 'confirm-pin-code.invalidated' }));
    }, 100);
  };