UNPKG

bigblocks

Version:

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

15 lines 1.2 kB
{ "name": "market-hooks-usemarketplace", "type": "registry:hook", "dependencies": [], "devDependencies": [], "registryDependencies": [], "files": [ { "path": "components/market/hooks/useMarketplace.ts", "type": "registry:hook", "content": "// useMarketplace Hook - Combined marketplace operations (buy + create listings)\n// This is a convenience wrapper that combines individual marketplace hooks\nimport { useBuyListing } from \"./useBuyListing.js\";\nimport { useCreateListing } from \"./useCreateListing.js\";\n\nexport function useMarketplace() {\n\tconst buyListing = useBuyListing();\n\tconst createListing = useCreateListing();\n\n\treturn {\n\t\t// Direct access to individual hooks\n\t\tbuy: buyListing,\n\t\tcreate: createListing,\n\n\t\t// Combined state\n\t\tisLoading: buyListing.isLoading || createListing.isLoading,\n\t\thasError: buyListing.isError || createListing.isError,\n\n\t\t// Combined reset\n\t\treset: () => {\n\t\t\tbuyListing.reset();\n\t\t\tcreateListing.reset();\n\t\t},\n\t};\n}\n\nexport type UseMarketplaceReturn = ReturnType<typeof useMarketplace>;\n", "target": "<%- config.aliases.hooks %>/usemarketplace.ts" } ] }