feat: use React routing to remove spin between signup and signin pages (#2740)

* fix: Regarding the color of loading

* fix: use goToLinkSoft and use same code format with result and forget psw

* fix: update signup url
This commit is contained in:
DacongDA
2024-02-24 12:59:09 +08:00
committed by GitHub
parent 6621d693de
commit a8699d0b87
4 changed files with 11 additions and 11 deletions

View File

@ -87,8 +87,8 @@ class SignupPage extends React.Component {
componentDidMount() {
const oAuthParams = Util.getOAuthGetParameters();
if (oAuthParams !== null) {
const signinUrl = window.location.href.replace("/signup/oauth/authorize", "/login/oauth/authorize");
sessionStorage.setItem("signinUrl", signinUrl);
const signinUrl = window.location.pathname.replace("/signup/oauth/authorize", "/login/oauth/authorize");
sessionStorage.setItem("signinUrl", signinUrl + window.location.search);
}
if (this.getApplicationObj() === undefined) {
@ -639,7 +639,7 @@ class SignupPage extends React.Component {
<a onClick={() => {
const linkInStorage = sessionStorage.getItem("signinUrl");
if (linkInStorage !== null && linkInStorage !== "") {
Setting.goToLink(linkInStorage);
Setting.goToLinkSoft(this, linkInStorage);
} else {
Setting.redirectToLoginPage(application, this.props.history);
}