Add resize listener and reload page

This commit is contained in:
Mathias Schopmans
2017-04-03 15:50:48 +02:00
parent 4a291866bd
commit 237ca8fcdf

View File

@@ -36,6 +36,14 @@ const historyManager = store => {
} }
} }
let reloadTimeout;
window.addEventListener('resize', function () {
clearTimeout(reloadTimeout);
reloadTimeout = setTimeout(() => {
window.location.reload();
}, 200);
});
// Grab the state from a global variable injected into the server-generated HTML // Grab the state from a global variable injected into the server-generated HTML
const preloadedState = window.__TECHRADAR__; const preloadedState = window.__TECHRADAR__;