Skip to content

Commit

Permalink
fix repression in #933
Browse files Browse the repository at this point in the history
  • Loading branch information
coderatomy committed Dec 21, 2023
1 parent a9130fd commit 3c3e219
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zubhub_frontend/zubhub/src/wrapper/PageWrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ function PageWrapper(props) {
}, [prevScrollPos]);

useEffect(() => {
if (!props.auth.token) {
if (!props.global && !props.auth.token) {
props.navigate('/session-expired');
}
}, [props.auth.token]);
}, [props.auth.token, props.global]);

useEffect(() => {
window.addEventListener('scroll', handleScroll);
Expand Down

0 comments on commit 3c3e219

Please sign in to comment.