feat: fix the issue of jumping back to the login page after resetting password (#1288)

* fix: redirect to login page

* fix: front end router

* fix: front end router

* fix: signup page router

* fix: redirect to login page
This commit is contained in:
Chell
2022-11-13 05:16:49 +01:00
committed by GitHub
parent d542208eb8
commit 61c2fd5412
5 changed files with 17 additions and 14 deletions

View File

@ -26,6 +26,7 @@ import {CountDownInput} from "../common/CountDownInput";
import SelectRegionBox from "../SelectRegionBox";
import CustomGithubCorner from "../CustomGithubCorner";
import SelectLanguageBox from "../SelectLanguageBox";
import {withRouter} from "react-router-dom";
const formItemLayout = {
labelCol: {
@ -541,7 +542,7 @@ class SignupPage extends React.Component {
title="Sign Up Error"
subTitle={"The application does not allow to sign up new account"}
extra={[
<Button type="primary" key="signin" onClick={() => Setting.redirectToLoginPage(application)}>
<Button type="primary" key="signin" onClick={() => Setting.redirectToLoginPage(application, this.props.history)}>
{
i18next.t("login:Sign In")
}
@ -600,7 +601,7 @@ class SignupPage extends React.Component {
if (linkInStorage !== null && linkInStorage !== "") {
Setting.goToLink(linkInStorage);
} else {
Setting.redirectToLoginPage(application);
Setting.redirectToLoginPage(application, this.props.history);
}
}}>
{i18next.t("signup:sign in now")}
@ -660,4 +661,4 @@ class SignupPage extends React.Component {
}
}
export default SignupPage;
export default withRouter(SignupPage);