diff --git a/src/pages/index.js b/src/pages/index.js index de91588f..bbfab3d3 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -27,9 +27,11 @@ const Hero = () => { const theme = useTheme() const date = new Date() - fetch('/.netlify/functions/page-views') - .then(response => response.json()) - .then(console.log) + if (typeof window === 'undefined') { + fetch('/.netlify/functions/page-views') + .then(response => response.json()) + .then(console.log) + } return (