Description
InvoiceListSentinel creates an IntersectionObserver to trigger infinite-scroll loading but does not call observer.disconnect() when the component unmounts. This causes stale callbacks to fire after navigation, which can trigger redundant API calls.
Acceptance Criteria
Context
- Target file:
src/components/InvoiceListSentinel.tsx
Description
InvoiceListSentinelcreates anIntersectionObserverto trigger infinite-scroll loading but does not callobserver.disconnect()when the component unmounts. This causes stale callbacks to fire after navigation, which can trigger redundant API calls.Acceptance Criteria
IntersectionObserveris disconnected inside auseEffectcleanup functionContext
src/components/InvoiceListSentinel.tsx