「ログイン画面にlocation」別のアカウントでログインするとloginに移行

このコミットが含まれているのは:
dragon1211 2021-12-30 18:11:56 -08:00
コミット ba9a0e44d2
2個のファイルの変更7行の追加2行の削除

ファイルの表示

@ -44718,7 +44718,9 @@ function PageChangeHandler() {
}, [pathname]);
var loginCheck = function loginCheck() {
console.log(pathname);
var acc = pathname.split('/')[1];
console.log(localStorage.getItem('kiki_acc_type'), acc);
if (localStorage.getItem('kiki_acc_type') && acc != localStorage.getItem('kiki_acc_type')) location.reload();
};
return null;

ファイルの表示

@ -9,7 +9,10 @@ export default function PageChangeHandler() {
}, [pathname]);
const loginCheck = () => {
console.log(pathname);
let acc = pathname.split('/')[1];
console.log(localStorage.getItem('kiki_acc_type'), acc);
if(localStorage.getItem('kiki_acc_type') && (acc != localStorage.getItem('kiki_acc_type')))
location.reload();
}
return null;