diff --git a/src/pages/index.js b/src/pages/index.js index 5f76695c..5f73e61e 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -478,6 +478,17 @@ const Index = ({ data: fallbackData, userAgent }) => { const showAchievements = showMockAchievements() const enableBackgroundImages = showBackgroundImages() + // No scolling on this home page. + useEffect(() => { + // Add the style when the component mounts + document.body.style.overflow = 'hidden' + + // Revert back to the initial style when the component unmounts + return () => { + document.body.style.overflow = '' + } + }, []) + // Determine which ad units we'll show only once, on mount, // because the ads have already been fetched and won't change. const [adUnits, setAdUnits] = useState([])