fix: allow Explore searches in places again (#2634)

* remove assumed and undocumented meaning of page being zero from our use of
  useInfiniteScroll in Explore; uses explicit type checks instead
* document byzantine pagination logic in useInfiniteExploreScroll
* fix broken infinite scroll when sorting by faves (was only showing first
  page)

The underlying problem from 96c316a was setting initialPageParam to 1 in
useAuthenticatedInfiniteQuery, which seems rational, except
useInfiniteExploreScroll was using a false-ish value of page to detect when
it was requesting its first page. This does the same by being more explicit
about page's type without injecting undocumented meaning into the params we
hand to useInfiniteScroll.

* refactor: move Explore page param munging into unit tested helper

Closes MOB-400
This commit is contained in:
Ken-ichi
2025-01-23 17:32:27 -08:00
committed by GitHub
parent 20952ec7aa
commit fb7a9bb421
7 changed files with 281 additions and 85 deletions

View File

@@ -324,6 +324,7 @@ fastlane prod
1. Delete the observation you just made
1. Go to Explore and view a taxon
1. Change to observations view and view an observation
1. Search for observations in a place
1. Go to the observers profile
1. Go to one project this user joined (if not available try another user)
1. Sign in