UNPKG

bigblocks

Version:

Complete Bitcoin UI component library - authentication, social, wallet, market, inscriptions, and blockchain interactions for React

37 lines 1.12 kB
import type { PostsResponse } from "bmap-api-types"; export interface UseContextualPostsOptions { contextType: "tx" | "url" | "channel"; contextValue: string; page?: number; limit?: number; enabled?: boolean; } export interface UseContextualPostsResult { posts: PostsResponse | null; isLoading: boolean; error: Error | null; refetch: () => void; } /** * Hook for fetching posts/comments in a specific context * * This enables displaying comments on albums, tracks, or any content * by providing a context type and value. * * @example * ```tsx * // Fetch comments for an album by transaction ID * const { posts } = useContextualPosts({ * contextType: 'tx', * contextValue: albumTxId * }); * * // Fetch comments for a URL * const { posts } = useContextualPosts({ * contextType: 'url', * contextValue: 'https://jamify.com/album/chromakopia' * }); * ``` */ export declare function useContextualPosts({ contextType, contextValue, page, limit, enabled, }: UseContextualPostsOptions): UseContextualPostsResult; //# sourceMappingURL=useContextualPosts.d.ts.map