• useProfileManagers is a paginated React hook that lets you fetch profile manager details for a given profile.

    Parameters

    • args: {
          for: ProfileId;
      }
      • for: ProfileId

        The Profile Id to fetch profile manager details for.

    Returns PaginatedReadResult<ProfileManager[]>

    Example

    Use this hook in combination with the ProfileSession returned by the useSession to fetch the profile managers for the logged-in Profile

    function ProfileManagers({ session }: { session: ProfileSession }) {
    const { data: managers, error, loading } = useProfileManagers({
    for: session.profile.id,
    });

    if (loading) {
    return <Loader />;
    }

    if (error) {
    return <Error message={error.message} />;
    }

    return (
    <ul>
    {managers.map(({ address }) => (
    <li key={address}>{address}</li>
    ))}
    </ul>
    );
    }