mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 21:30:24 +08:00
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:
@ -13,7 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
import React from "react";
|
||||
import {Link, useHistory} from "react-router-dom";
|
||||
import {Link} from "react-router-dom";
|
||||
import {Tag, Tooltip, message} from "antd";
|
||||
import {QuestionCircleTwoTone} from "@ant-design/icons";
|
||||
import {isMobile as isMobileDevice} from "react-device-detect";
|
||||
@ -752,7 +752,7 @@ export function getLoginLink(application) {
|
||||
} else if (authConfig.appName === application.name) {
|
||||
url = "/login";
|
||||
} else if (application.signinUrl === "") {
|
||||
url = path.join(application.homepageUrl, "login");
|
||||
url = path.join(application.homepageUrl, "/login");
|
||||
} else {
|
||||
url = application.signinUrl;
|
||||
}
|
||||
@ -764,9 +764,8 @@ export function renderLoginLink(application, text) {
|
||||
return renderLink(url, text, null);
|
||||
}
|
||||
|
||||
export function redirectToLoginPage(application) {
|
||||
export function redirectToLoginPage(application, history) {
|
||||
const loginLink = getLoginLink(application);
|
||||
const history = useHistory();
|
||||
history.push(loginLink);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user