Skip to content

Commit

Permalink
changed deprecated pageYOffset to scrollY
Browse files Browse the repository at this point in the history
  • Loading branch information
hppanpaliya committed Sep 13, 2023
1 parent c07fb4e commit 17ed488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion react/src/components/InboxList/SingleEmailItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const SingleEmailItem = ({ email, handleEmailClick, handleOpenModal, setEmailToD

useEffect(() => {
const handleScroll = () => {
const currentScrollPos = window.pageYOffset;
const currentScrollPos = window.scrollY;
setScrollDirection(prevScrollPos.current > currentScrollPos ? 'up' : 'down');
prevScrollPos.current = currentScrollPos;
};
Expand Down

0 comments on commit 17ed488

Please sign in to comment.