Closes #417
feat(client): Add infinite scroll pagination to Home page
Implements infinite scroll pagination on the Home page to improve performance and user experience as the number of raffles grows. Replaces the single large fetch with incremental page loading triggered by an IntersectionObserver sentinel.
The Home page currently loads all raffles in a single request, causing:
- Long initial load times as the raffle catalog grows
- Large DOM rendering overhead
- Poor perceived performance on slower connections
- No way to browse incrementally
An infinite scroll system with the following components:
useIntersectionObserverhook β Reusable IntersectionObserver wrapper- Sentinel-based loading β Auto-fetches next page when user scrolls near bottom
- Scroll position preservation β Restores scroll position on browser back navigation
- Deduplication β Prevents duplicate cards between overlapping requests
- β Auto-load on scroll β Next page fetches when sentinel enters viewport (200px rootMargin)
- β
Skeleton loading state β
RaffleCardSkeletongrid shown while fetching more - β "No more raffles" indicator β Shown when all items are loaded
- β
Duplicate prevention β
Mapdeduplication by raffle ID - β
Scroll restoration β
sessionStoragecache preserves position on back navigation