Add scroll to top on navigate action

This commit is contained in:
Mathias Schopmans
2017-04-03 15:49:53 +02:00
parent f6c19ffefd
commit 4a291866bd

View File

@@ -29,6 +29,7 @@ const historyManager = store => {
return next => action => {
if(action.type === NAVIGATE && action.pushToHistory === true) {
window.scrollTo(0, 0);
history.push(`/${action.pageName}.html`);
}
return next(action);