UNPKG

@oxyhq/services

Version:

Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀

33 lines • 1.21 kB
export type SingleFollowResult = { isFollowing: boolean; isLoading: boolean; error: string | null; toggleFollow: () => Promise<void>; setFollowStatus: (following: boolean) => void; fetchStatus: () => Promise<void>; clearError: () => void; followerCount: number | null; followingCount: number | null; isLoadingCounts: boolean; fetchUserCounts: () => Promise<void>; setFollowerCount: (count: number) => void; setFollowingCount: (count: number) => void; }; export type MultiFollowResult = { followData: Record<string, { isFollowing: boolean; isLoading: boolean; error: string | null; }>; toggleFollowForUser: (userId: string) => Promise<void>; setFollowStatusForUser: (userId: string, following: boolean) => void; fetchStatusForUser: (userId: string) => Promise<void>; fetchAllStatuses: () => Promise<void>; clearErrorForUser: (userId: string) => void; isAnyLoading: boolean; hasAnyError: boolean; allFollowing: boolean; allNotFollowing: boolean; }; export type UseFollowHook = (userId?: string | string[]) => SingleFollowResult | MultiFollowResult; //# sourceMappingURL=useFollow.types.d.ts.map