Feeds a profile's lists of dumps, the user's own and those they upvoted, to its overview and to its "dumps" and "upvoted" tabs, and keeps them live.

Functions

f
useUserDumpFeed(
userId: string,
list: UserDumpList,
unnamed 2: UseUserDumpFeedOptions
): UseUserDumpFeedResult

Returns list of user userId, from GET /api/users/:userId/<list>, fetched signed in so users see their own private dumps, with the call that loads its next page; with categorySlug, only the dumps in that category. The socket keeps it live: the user's new dumps come in, a dump that goes private and public again comes back at its place, one edited out of the category leaves, one edited into it comes in, and the upvoted list follows the user's votes, source holding dumps at hand that a vote of theirs puts first at once. A reconnection fetches the pages loaded again. The list and the scroll position are saved as the page is left, under a key the overview and the unfiltered tab share, and going back restores them.

Interfaces

I
UseUserDumpFeedOptions

Passed to useUserDumpFeed by the profile's overview and tabs.

I
UseUserDumpFeedResult

Returned by useUserDumpFeed.

Type Aliases

T
UserDumpList = "dumps" | "upvoted"

One of a profile's lists of dumps, a path segment of its API and page.