feat: load more pagination for user profile thoughts

This commit is contained in:
2026-05-16 15:21:18 +02:00
parent 4a84c595d5
commit 39f7d39232
3 changed files with 86 additions and 17 deletions

View File

@@ -343,9 +343,9 @@ export const getFeed = (token: string, page: number = 1, pageSize: number = 20)
token
);
export const getUserThoughts = (username: string, token: string | null) =>
export const getUserThoughts = (username: string, token: string | null, page = 1) =>
apiFetch(
`/users/${username}/thoughts`,
`/users/${username}/thoughts?page=${page}`,
{ next: { tags: [`profile:${username}`] } },
z.object({ items: z.array(ThoughtSchema), total: z.number(), page: z.number(), per_page: z.number() }),
token