Ant design pro route redirection error

ant design pro dynamic routing for user rights control, but the route cannot jump to the specified page.
each re-login will cache the last requested route list, and the redirect address is also incorrect.

clipboard.png
re-log in and take the route of the last login.
got the list of the last login inexplicably before requesting menu.

getBashRedirect = () = > {

// , url  redirect 
let { routerData } = this.props;
const urlParams = new URL(window.location.href);
const redirect = urlParams.searchParams.get("redirect");

if (redirect) {
  urlParams.searchParams.delete("redirect");
  window.history.replaceState(null, "redirect", urlParams.href);
} else {
  
  const authorizedPath = Object.keys(routerData).find(
    item => check(routerData[item].authority, item) && item !== "/"
  );
  console.log("authorizedPath", authorizedPath);
  return authorizedPath;
}
return redirect;

};

Mar.25,2021

has been solved. Every time you log in again, you can empty the menu routerData stored in props

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ab47-2c22f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ab47-2c22f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?