diff --git a/booking-app/components/src/client/routes/components/bookingTable/Bookings.tsx b/booking-app/components/src/client/routes/components/bookingTable/Bookings.tsx index ba481b2..3eb9469 100644 --- a/booking-app/components/src/client/routes/components/bookingTable/Bookings.tsx +++ b/booking-app/components/src/client/routes/components/bookingTable/Bookings.tsx @@ -31,7 +31,7 @@ export const Bookings: React.FC = ({ pageContext, calendarEventId, }) => { - const { bookingsLoading, reloadFutureBookings, fetchAllBookings, allBookings, loadMoreEnabled } = + const { bookingsLoading, setLastItem, fetchAllBookings, allBookings, loadMoreEnabled } = useContext(DatabaseContext); const allowedStatuses = useAllowedStatuses(pageContext); @@ -45,9 +45,12 @@ export const Bookings: React.FC = ({ const isUserView = pageContext === PageContextLevel.USER; - // useEffect(() => { - // reloadFutureBookings(); - // }, []); + useEffect(() => { + // reloadFutureBookings(); + return ()=>{ + setLastItem(null); + } + }, []); const filteredRows = useBookingFilters({ pageContext,