getPageTitle()

in src/layouts/BasicLayout.js [174:189]


  getPageTitle() {
    const { routerData, location } = this.props;
    const { pathname } = location;
    let title = "Apache ShenYu - Gateway Management";
    let currRouterData = null;
    // match params path
    Object.keys(routerData).forEach((key) => {
      if (pathToRegexp(key).test(pathname)) {
        currRouterData = routerData[key];
      }
    });
    if (currRouterData && currRouterData.name) {
      title = `Apache ShenYu - ${currRouterData.name}`;
    }
    return title;
  }