diff --git a/frontend/src/components/EntriesNavigation.js b/frontend/src/components/EntriesNavigation.js index 6527fab1..0f2d60fe 100644 --- a/frontend/src/components/EntriesNavigation.js +++ b/frontend/src/components/EntriesNavigation.js @@ -40,6 +40,8 @@ import { FaFilter } from "react-icons/fa"; import useStream from "../core/hooks/useStream"; import { ImCancelCircle } from "react-icons/im"; import { previousEvent } from "../core/services/stream.service"; +import { useQueryClient } from "react-query"; +import { PAGE_SIZE } from "../core/constants"; const FILTER_TYPES = { ADDRESS: 0, @@ -75,7 +77,8 @@ const EntriesNavigation = () => { }, ]); const [filterState, setFilterState] = useState([]); - + const queryClient = useQueryClient(); + console.log(queryClient); const loadMoreButtonRef = useRef(null); const { @@ -83,6 +86,7 @@ const EntriesNavigation = () => { eventsIsLoading, eventsRefetch, eventsIsFetching, + setEvents, latestEventsRefetch, nextEventRefetch, previousEventRefetch, @@ -90,6 +94,8 @@ const EntriesNavigation = () => { setDefaultBoundary, loadOlderEvents, loadNewerEvents, + cursor, + setCursor, } = useStream(ui.searchTerm.q); useEffect(() => { @@ -460,8 +466,64 @@ const EntriesNavigation = () => {