Skip to content

Commit da033b2

Browse files
fix bug #95
1 parent fa0e433 commit da033b2

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/Components/TopBar/StatusBlock/StatusBlock.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ export function StatusBlock() {
4040
useEffect(() => {
4141
if (user === null) {
4242
emptyCache().then(() => {
43-
navigate('/login');
43+
if (window.location.pathname !== '/agreement') {
44+
navigate('/login');
45+
}
4446
});
4547
}
4648
}, [user, navigate]);

src/Data/Common.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ export async function handleErrors(response) {
3737
* @return: response
3838
*/
3939
if (response.status === 401) {
40+
console.log(window.location.pathname)
41+
if (window.location.pathname === "/agreement") {
42+
return;
43+
}
4044
if (!["/login", "/register", "/reset"].includes(window.location.pathname)) {
4145
window.location.href = "/login";
4246
}

0 commit comments

Comments
 (0)