File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
src/apps/talent-search/src/routes/search-results-page Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,8 @@ const SearchResultsPage: FC = () => {
36
36
const visibleHeight = window . innerHeight
37
37
const fullHeight = document . body . scrollHeight
38
38
39
- if ( scrollY + visibleHeight >= fullHeight - 100 ) {
39
+ // negating 763px since footer occupies at least 600px
40
+ if ( scrollY + visibleHeight >= fullHeight - 763 ) {
40
41
// Scroll near bottom
41
42
setCurrentPage ( prev => {
42
43
const maxPages = Math . ceil ( matches . length / itemsPerPage )
@@ -49,10 +50,6 @@ const SearchResultsPage: FC = () => {
49
50
return ( ) => window . removeEventListener ( 'scroll' , handleScroll )
50
51
} , [ matches ] )
51
52
52
- useEffect ( ( ) => {
53
- setCurrentPage ( 1 )
54
- } , [ skills , matches ] )
55
-
56
53
const toggleSkillsModal = useCallback ( ( ) => setShowSkillsModal ( s => ! s ) , [ ] )
57
54
58
55
const skillsModalTriggerBtn = (
You can’t perform that action at this time.
0 commit comments