hooks APIs
- useActiveWeb3React
- useApi
- useDebounce
- usePersistentState
- useOutsideClick
- useEventListener
- useEvents
- useSubscription
- useCodeUpload
- useProgram
- useChangeEffect
- useBodyScrollLock
- useBlocks
- usePrefixedTranslation
- useAlert
- useAccounts
- useLoggedInAccount
- useBalanceSubscription
- useOwnersNft
- useMarketplace
- useNft
- useMarketNft
- useEditor
- useLoading
- usePageVisibility
- useHubspotForm
- useAnalyzer
- useMailchimp
- useLoggedIn
- useUuid
- useEscToClose
- useLockBody
- useDrag
- useIsMounted
- useOnImageLoad
- useOnScreen
- useIsDesktop
- useInfiniteScroll
- useDomainApi
- useURQL
- useQuery
- useURLParser
- usePagination
- useQueryParams
- useRegisterRecentVisit
- usePopUp
- useFormProgress
- useTextClip
- useDocumentTitle
- useInitTransak
- useEagerConnect
- useInactiveListener
- useTheme
- useERC20
- useNftMessage
- useDocumentApi
- useDocumentSet
- useNotify
- usePortal
- usePopupClose
- useScrollToggler
- useMediaQuery
- useBooleanState
- useAccount
- useMarketplaceMessage
- useInput
- useToggle
- useIPFS
- useForm
Other Related APIs
hooks#useMarketplace TypeScript Examples
The following examples show how to use
hooks#useMarketplace.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Listings.tsx From gear-js with GNU General Public License v3.0 | 6 votes |
function Listings() {
const [filter, setFilter] = useState('All');
const nfts = useMarketplace();
const conditionCallback = conditions[filter];
const filteredNfts = nfts?.map((nft) =>
conditionCallback(nft) ? { ...nft, isVisible: true } : { ...nft, isVisible: false },
);
return (
<>
<Header text="NFT Marketplace" filter={filter} filters={filters} onFilterChange={setFilter} />
<div className={styles.main}>{filteredNfts && <List nfts={filteredNfts} />}</div>
</>
);
}