Skip to content

Commit

Permalink
fix: do not open newsletter popup on programmatic scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
elbotho committed Jul 29, 2024
1 parent e893265 commit 166d851
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/src/helper/use-scroll-up-trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function useScrollUpTrigger(handleScroll: () => void, active: boolean) {
useEffect(() => {
const handler = () => {
const isUp = window.scrollY < oldScrollY.current
if (isUp) handleScroll()
if (isUp && window.scrollY > 100) handleScroll()
oldScrollY.current = window.scrollY
}

Expand Down

0 comments on commit 166d851

Please sign in to comment.