fix: login / signin frontend router (#1244)

* fix: go to link

* fix: remove gotologin

* fix: redirect to login page

* fix: redirect to login page

* remove comments

* fix: formats

* fix: formats

* Update Setting.js

Co-authored-by: hsluoyz <hsluoyz@qq.com>
This commit is contained in:
Chell
2022-10-27 20:23:57 +02:00
committed by GitHub
parent 80bf29d79a
commit 7e5952c804
6 changed files with 44 additions and 44 deletions

View File

@ -190,7 +190,7 @@ class PromptPage extends React.Component {
if (redirectUrl !== "" && redirectUrl !== null) {
Setting.goToLink(redirectUrl);
} else {
Setting.goToLogin(this, this.getApplicationObj());
Setting.redirectToLoginPage(this.getApplicationObj());
}
} else {
Setting.showMessage("error", `Failed to log out: ${res.msg}`);
@ -234,10 +234,10 @@ class PromptPage extends React.Component {
title="Sign Up Error"
subTitle={"You are unexpected to see this prompt page"}
extra={[
<Button type="primary" key="signin" onClick={() => {
Setting.goToLogin(this, application);
}}>
Sign In
<Button type="primary" key="signin" onClick={() => Setting.redirectToLoginPage(application)}>
{
i18next.t("login:Sign In")
}
</Button>,
]}
>