Skip to content

Commit

Permalink
chore: auto-scroll prevention removed
Browse files Browse the repository at this point in the history
  • Loading branch information
josephgregoryii committed Jan 3, 2022
1 parent 62fea37 commit 72c70ed
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions gatsby-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,4 @@ const onClientEntry = () => {
window.ReactDOM = require('react-dom');
};

const shouldUpdateScroll = ({ routerProps: { location } }) => {
const TRANSITION_DELAY = 600;

// Scroll window to top position if there is no search (i.e., page load)
if (!location.search) {
window.setTimeout(() => window.scrollTo(0, 0), TRANSITION_DELAY);
}
return false;
};

export {
wrapPageElement,
onInitialClientRender,
onClientEntry,
shouldUpdateScroll,
};
export { wrapPageElement, onInitialClientRender, onClientEntry };

0 comments on commit 72c70ed

Please sign in to comment.