diff --git a/src/pages/index.js b/src/pages/index.js index 4f50a264..ea32c555 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/hello') - .then(response => response.json()) - .then(console.log) + if (typeof window !== 'undefined') { + fetch('/.netlify/functions/hello') + .then(response => response.json()) + .then(console.log) + } return (