diff --git a/components/JumpToTop.js b/components/JumpToTop.js index d14ff486..18514766 100644 --- a/components/JumpToTop.js +++ b/components/JumpToTop.js @@ -20,6 +20,7 @@ const JumpToTop = ({ targetRef, showPercent = true }) => { const scrollY = window.pageYOffset const fullHeight = clientHeight - window.outerHeight const shouldShow = scrollY > 100 + console.log(clientHeight, scrollY, fullHeight, shouldShow) if (shouldShow !== show) { switchShow(shouldShow) } @@ -33,7 +34,7 @@ const JumpToTop = ({ targetRef, showPercent = true }) => { }, [show]) return ( -
+
window.scrollTo({ top: 0, behavior: 'smooth' })}