fix: users login page can refresh

This commit is contained in:
shuai 2023-03-02 15:35:06 +08:00
parent f48c207b14
commit 6393560409
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@ const Header: FC = () => {
};
const onLoginClick = (evt) => {
evt.preventDefault();
if (location.pathname === '/users/login') {
window.location.reload();
return;
}
floppyNavigation.navigateToLogin((loginPath) => {
navigate(loginPath, { replace: true });
});