[FIX] Content being hidden after logging in
Ensure overflow is only disabled when login page is showing
This commit is contained in:
13
src/RouteChangeTracker.js
Normal file
13
src/RouteChangeTracker.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import { withRouter } from "react-router-dom";
|
||||
|
||||
export default withRouter(function RouteChangeTracker({ history, logEvent }) {
|
||||
history.listen((location, action) => {
|
||||
if (location.pathname === "/login") {
|
||||
document.body.style.overflow = "hidden";
|
||||
} else {
|
||||
document.body.style.overflow = "auto";
|
||||
}
|
||||
});
|
||||
|
||||
return null;
|
||||
})
|
||||
Reference in New Issue
Block a user