useUserTopBids
This hook is SWR powered and also handles infinite loading UX. Use this hook to fetch a single user’s top bids, using the User Top Bids endpoint. It takes in a user, as the first parameter, a query object which maps to the same parameters that the API endpoint uses, as the second parameter, and an optional SWR Infinite configuration object, as the third parameter.
Parameter | Type |
---|---|
user | string |
options | User Top Bids options |
swrOptions | SWR Options |
import { useUserTopBids } from '@reservoir0x/reservoir-kit-ui'
const {
data: bids,
fetchNextPage,
hasNextPage,
} = useUserTopBids('0xF296178d553C8Ec21A2fBD2c5dDa8CA9ac905A00', {})
Updated almost 2 years ago