mirror of https://gitee.com/answerdev/answer.git
fix: users login page can refresh
This commit is contained in:
parent
f48c207b14
commit
6393560409
|
@ -71,6 +71,10 @@ const Header: FC = () => {
|
||||||
};
|
};
|
||||||
const onLoginClick = (evt) => {
|
const onLoginClick = (evt) => {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
|
if (location.pathname === '/users/login') {
|
||||||
|
window.location.reload();
|
||||||
|
return;
|
||||||
|
}
|
||||||
floppyNavigation.navigateToLogin((loginPath) => {
|
floppyNavigation.navigateToLogin((loginPath) => {
|
||||||
navigate(loginPath, { replace: true });
|
navigate(loginPath, { replace: true });
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue