Fetches the user a profile page is about.

Functions

f
fetchPublicUser(
username: string,
signal: AbortSignal
): Promise<PublicUser>

Returns GET /api/users/@:username, for the profile, which fails as a whole when it does. username may be a former name, or the name in another case: the user comes back with their current one, which the profile puts in its URL. It is fetched afresh even when the lists come from useFeedCache.

Usage

import * as mod from "src/utils/shared/fetchPublicUser.ts";