How to use the umi.history.push function in umi

To help you get started, we’ve selected a few umi 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 apache / apisix-dashboard / web / src / pages / Setting / Setting.tsx View on Github external
const redirect = getUrlQuery('redirect');
          const currentHost = window.location.host;
          if (redirect) {
            const redirectUrl = decodeURIComponent(redirect);
            const pathArray = redirectUrl.split('/');
            const redirectHost = pathArray[2];
            if (currentHost === redirectHost) {
              let path = '';
              for (let i = 3; i < pathArray.length; i += 1) {
                path += '/';
                path += pathArray[i];
              }
              history.push(path);
            }
          } else {
            history.push('/');
          }
        }, 500);
      });
github apache / apisix-dashboard / web / src / pages / Service / Create.tsx View on Github external
.then(() => {
        notification.success({
          message: `${serviceId
            ? formatMessage({ id: 'component.global.edit' })
            : formatMessage({ id: 'component.global.create' })
            } ${formatMessage({ id: 'menu.service' })} ${formatMessage({
              id: 'component.status.success',
            })}`,
        });
        history.push('/service/list');
      })
      .catch(() => {
github apache / apisix-dashboard / web / src / pages / Plugin / List.tsx View on Github external
          <button type="primary"> history.push('/plugin/market')}&gt;
            </button>
github apache / apisix-dashboard / web / src / pages / PluginTemplate / List.tsx View on Github external
          <button type="primary"> history.push('/plugin-template/create')}&gt;
            </button>
github apache / apisix-dashboard / web / src / pages / Service / List.tsx View on Github external
              onClick={() => history.push(`/service/${record.id}/edit`)}
            >
github apache / apisix-dashboard / web / src / pages / PluginTemplate / Create.tsx View on Github external
.then(() => {
        notification.success({
          message: `${id
            ? formatMessage({ id: 'component.global.edit' })
            : formatMessage({ id: 'component.global.create' })
            } ${formatMessage({ id: 'menu.pluginTemplate' })} ${formatMessage({
              id: 'component.status.success',
            })}`,
        });
        history.push('/plugin-template/list');
      })
      .catch(() => {
github apache / apisix-dashboard / web / src / pages / Consumer / List.tsx View on Github external
            onClick={() => history.push(`/consumer/${record.username}/edit`)}
          >
github oam-dev / kubevela / dashboard / src / layouts / BasicLayout.jsx View on Github external
onClick={() => {
              setCurrentSelectedKeys([menuItemProps.key]);
              history.push(menuItemProps.path);
            }}
          >
github apache / apisix-dashboard / web / src / pages / Route / List.tsx View on Github external
onClick: () => {
          history.push('/plugin-template/list')
        }
      }, {
github oam-dev / kubevela / references / dashboard / src / pages / Application / index.tsx View on Github external
onClick={(e) => {
                history.push('/applications/create');
                e.preventDefault();
              }}
            >