useProfilePublicationsForSale
useProfilePublicationsForSale
is a React hook used to query publications for sale by a profile.
const { data, loading, hasMore, next } = useProfilePublicationsForSale(args)
Usage
import { useProfilePublicationsForSale } from '@lens-protocol/react-web';
function ProfilePublicationsForSale() {
const {
data,
loading,
hasMore,
next,
} = useProfilePublicationsForSale({
profileId: '0x1b-0x0118',
observerId: '0x02',
limit: 10,
});
}
Reference
useProfilePublicationsForSale(args)
useProfilePublicationsForSale(args)
Parameters
profileId: string
(required)
- The id of the profile that posted the publications for sale
observerId: string
(optional)
- The id of the profile who is running the query, usually the logged in/active profile
limit: number
(optional)
- The amount of items to return
Returns
{
data: PublicationFragment[],
loading: boolean,
hasMore: boolean, // whether there are more results after the current batch
next(): () => void // fetches the next batch and appends to the data
}
Updated 6 months ago