@lens-protocol/react
Version:
Interacting with the Lens Protocol API using React.
45 lines (44 loc) • 1.54 kB
TypeScript
import { Profile, ProfileRecommendationsRequest } from '@lens-protocol/api-bindings';
import { PaginatedArgs, PaginatedReadResult } from "../helpers/reads.js";
import { SuspenseEnabled, SuspensePaginatedResult } from "../helpers/suspense.js";
/**
* {@link useRecommendedProfiles} hook arguments
*/
export type UseRecommendedProfilesArgs = PaginatedArgs<ProfileRecommendationsRequest>;
export type { ProfileRecommendationsRequest };
/**
* {@link useRecommendedProfiles} hook arguments with Suspense support
*/
export type UseSuspenseRecommendedProfilesArgs = SuspenseEnabled<UseRecommendedProfilesArgs>;
/**
* Provides profile recommendations based on user's social engagement and machine learning predictions.
*
* ```tsx
* const { data, loading, error } = useRecommendedProfiles({
* for: '0x123',
* });
* ```
*
* @category Discovery
* @group Hooks
*/
export declare function useRecommendedProfiles(args: UseRecommendedProfilesArgs): PaginatedReadResult<Profile[]>;
/**
* Provides profile recommendations based on user's social engagement and machine learning predictions.
*
* This signature supports [React Suspense](https://react.dev/reference/react/Suspense).
*
* ```ts
* const { data } = useRecommendedProfiles({
* for: '0x123',
* suspense: true
* });
*
* console.log(data);
* ```
*
* @experimental This API can change without notice
* @category Discovery
* @group Hooks
*/
export declare function useRecommendedProfiles(args: UseSuspenseRecommendedProfilesArgs): SuspensePaginatedResult<Profile[]>;