feat(life): add infinite scroll pagination to feed

Implement cursor-based pagination in backend API
Add IntersectionObserver to frontend for automatic loading on scroll
This commit is contained in:
2026-05-01 23:29:05 +08:00
parent 71b7e838ed
commit c03d4271e1
6 changed files with 240 additions and 27 deletions

View File

@@ -195,7 +195,7 @@ app.get('/api/daily-checklist', async (request) => listDailyChecklistItems(reque
app.get('/api/life-posts', async (request) => {
const user = await optionalUser(request);
return listLifePosts(user?.id ?? null);
return listLifePosts(request.query as Record<string, string | string[] | undefined>, user?.id ?? null);
});
app.post('/api/life-posts', async (request, reply) => {