UNPKG

@lens-protocol/react

Version:

Interacting with the Lens Protocol API using React.

48 lines (47 loc) 1.43 kB
import { Profile, FollowersRequest } from '@lens-protocol/api-bindings'; import { PaginatedArgs, PaginatedReadResult } from "../helpers/reads.js"; import { SuspenseEnabled, SuspensePaginatedResult } from "../helpers/suspense.js"; /** * {@link useProfileFollowers} hook arguments */ export type UseProfileFollowersArgs = PaginatedArgs<FollowersRequest>; export type { FollowersRequest }; /** * {@link useProfileFollowers} hook arguments with Suspense support * * @experimental This API can change without notice */ export type UseSuspenseProfileFollowersArgs = SuspenseEnabled<UseProfileFollowersArgs>; /** * Fetch profiles that follow a requested profile. * * @example * ```tsx * const { data, loading, error } = useProfileFollowers({ * of: '0x123', * }); * ``` * * @category Profiles * @group Hooks */ export declare function useProfileFollowers(args: UseProfileFollowersArgs): PaginatedReadResult<Profile[]>; /** * Fetch profiles that follow a requested profile. * * This signature supports [React Suspense](https://react.dev/reference/react/Suspense). * * ```tsx * const { data } = useProfileFollowers({ * of: '0x123', * suspense: true, * }); * * console.log(data); * ``` * * @experimental This API can change without notice * @category Profiles * @group Hooks */ export declare function useProfileFollowers(args: UseSuspenseProfileFollowersArgs): SuspensePaginatedResult<Profile[]>;