UNPKG

bigblocks

Version:

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

22 lines (21 loc) 795 B
// useMarketplace Hook - Combined marketplace operations (buy + create listings) // This is a convenience wrapper that combines individual marketplace hooks import { useBuyListing } from "./useBuyListing.js"; import { useCreateListing } from "./useCreateListing.js"; export function useMarketplace() { const buyListing = useBuyListing(); const createListing = useCreateListing(); return { // Direct access to individual hooks buy: buyListing, create: createListing, // Combined state isLoading: buyListing.isLoading || createListing.isLoading, hasError: buyListing.isError || createListing.isError, // Combined reset reset: () => { buyListing.reset(); createListing.reset(); }, }; }