pass currentScrollY to guard condition