Skip to content

Commit d565783

Browse files
committed
fix: modified the scroll event
1 parent e621c94 commit d565783

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/apps/talent-search/src/routes/search-results-page/SearchResultsPage.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ const SearchResultsPage: FC = () => {
3535
const scrollY = window.scrollY
3636
const visibleHeight = window.innerHeight
3737
const fullHeight = document.body.scrollHeight
38-
39-
// negating 763px since footer occupies at least 600px
40-
if (scrollY + visibleHeight >= fullHeight - 763) {
38+
const footerElem = document.getElementById("footer-nav-el");
39+
const footerHeight = footerElem && footerElem.offsetHeight || 650;
40+
if (scrollY + visibleHeight >= fullHeight - footerHeight + 100) {
4141
// Scroll near bottom
4242
setCurrentPage(prev => {
4343
const maxPages = Math.ceil(matches.length / itemsPerPage)

0 commit comments

Comments
 (0)