diff --git a/landing/landing.react.js b/landing/landing.react.js --- a/landing/landing.react.js +++ b/landing/landing.react.js @@ -49,6 +49,19 @@ [modalContext.modals], ); + const isModalOpen = modals.length > 0; + React.useEffect(() => { + if (!document.body || !isModalOpen) { + return undefined; + } + + const { body } = document; + body.style.overflow = 'hidden'; + return () => { + body.style.overflow = 'auto'; + }; + }, [isModalOpen]); + const [showMobileNav, setShowMobileNav] = React.useState(false); const handleResize = React.useCallback(() => {