How to use the antd.Modal.error 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 aspnetboilerplate / module-zero-core-template / reactjs / src / scenes / Login / index.tsx View on Github external
if (!tenancyName) {
      abp.multiTenancy.setTenantIdCookie(undefined);
      window.location.href = '/';
      return;
    } else {
      await this.props.accountStore!.isTenantAvailable(tenancyName);
      const { tenant } = this.props.accountStore!;
      switch (tenant.state) {
        case TenantAvailabilityState.Available:
          abp.multiTenancy.setTenantIdCookie(tenant.tenantId);
          loginModel.tenancyName = tenancyName;
          loginModel.toggleShowModal();
          window.location.href = '/';
          return;
        case TenantAvailabilityState.InActive:
          Modal.error({ title: L('Error'), content: L('TenantIsNotActive') });
          break;
        case TenantAvailabilityState.NotFound:
          Modal.error({ title: L('Error'), content: L('ThereIsNoTenantDefinedWithName{0}', tenancyName) });
          break;
      }
    }
  };
github wfh45678 / radar / webapp / src / component / utils / fetchUtil.jsx View on Github external
.then((res) => {
	        	if(method!='GET'){hide();}
	        	if(res.ok){ 
		            return res.json();
	            }
	            else{
					if(window.modal==undefined){
						window.modal=Modal.error({
							title: '系统错误',
							content: '请检查是否有参数配置错误',
							onOk:()=>{
									window.modal=undefined;
								}
						});
					}
	            } 
	        })
	        .then((data)=>{
github Ameobea / tickgrinder / mm-react / src / utils / commands.js View on Github external
const wsError = () => {
  Modal.error({
    closable: false,
    title: 'Unable to connect to Websocket server!',
    content: 'In order to use this interface, the Redis<->Websocket proxy must be running.  \n\n' +
      'To start it, run.sh in the project root directory and refresh this page.'
  });
}
github appbaseio / dashboard / src / pages / ClusterPage / NewMyCluster.js View on Github external
handleError = () => {
		const that = this;
		Modal.error({
			title: 'Error',
			content: this.state.deploymentError,
			onOk() {
				that.setState({
					showError: false,
				});
			},
		});
	};
github opencv / cvat / cvat-ui / src / components / tasks-page / tasks-header / tasks-header.tsx View on Github external
(error: any) => {
                  reject(error);
                  Modal.error({ title: error.message, centered: true, okType: 'danger' })
                }
              );
github mingzuozhibi / mzzb-ui / src / App.tsx View on Github external
this.update(draft => {
      if (result.success) {
        draft.session = result.data
      } else {
        Modal.error({title: '获取当前登入状态异常', content: result.message})
      }
    })
github yvanwangl / AccountSystem / src / components / SystemInfo / SystemInfo.jsx View on Github external
}).then(null, (data)=> {
				//code 为 3 表示用户名已被注册
				if(!data.success && data.code == 3){
					Modal.error({
						title: '错误提示',
						content: <p style="{{fontSize:">该用户名已被注册!</p>
					});
				}
			});
		},
github pingcap / tidb-dashboard / ui / lib / apps / DataManager / pages / DBTableList.tsx View on Github external
const handleOk = async (values) =&gt; {
    switch (modalInfo.type) {
      case 'editTable':
        try {
          await xcClient.renameTable(db, modalInfo.tableName, values.tableName)
          Modal.success({
            content: t('data_manager.update_success_txt'),
          })
        } catch (e) {
          Modal.error({
            title: t('data_manager.update_failed_txt'),
            content: <pre>{e.message}</pre>,
          })
        }
        break
      case 'deleteTable':
        try {
          await xcClient.dropTable(db, modalInfo.tableName)
          Modal.success({
            content: t('data_manager.delete_success_txt'),
          })
        } catch (e) {
          Modal.error({
            title: t('data_manager.delete_failed_txt'),
            content: <pre>{e.message}</pre>,
          })
github mingzuozhibi / mzzb-ui / src / app / module / appbar / index.js View on Github external
draft.sideDrawerOpen = true
        break
      case ACTION_HIDE_SIDE_DRAWER:
        draft.sideDrawerOpen = false
        break
      case ACTION_SHOW_LOGIN_FRAME:
        draft.loginFrameOpen = true
        break
      case ACTION_HIDE_LOGIN_FRAME:
        draft.loginFrameOpen = false
        break
      case ACTION_ALERT_INFO:
        Modal.info({title: action.title, content: action.content})
        break
      case ACTION_ALERT_ERROR:
        Modal.error({title: action.title, content: action.content})
        break
      case ACTION_ALERT_WARNING:
        Modal.warning({title: action.title, content: action.content})
        break
      case ACTION_ALERT_SUCCESS:
        Modal.success({title: action.title, content: action.content})
        break
      default:
    }
  })
}