UNPKG

@lens-protocol/react

Version:

Interacting with the Lens Protocol API using React.

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