From 38e733f7398882e0dcb6a93c0dd02b5be24642de Mon Sep 17 00:00:00 2001 From: Spicer Matthews Date: Tue, 16 Jan 2024 20:23:12 -0800 Subject: [PATCH] Added overflow hidden to landing page --- src/pages/index.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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([])