useNotifications
Last updated
useNotifications<
T>(mapper,isSignedIn,address?,limit?,refetchInterval?,filters?):object
Custom hook to manage notifications using the Haven1 SDK.
โข T
(item) => T
Function to map notification items.
boolean
Indicates whether the user is signed in.
string
Optional address associated with the notifications.
number = 5
Optional limit for the number of notifications to fetch.
number = ...
Optional interval in milliseconds for refetching notifications.
Record<string, string[]> = {}
Optional filters applied to the notifications.
object
newNotifications:
object[]
newNotificationsCount:
undefined|string
notifications:
UseInfiniteQueryResult<InfiniteData<{hasMore:boolean;items:never[];pageParam:number;rawItems:undefined; } | {hasMore:boolean;items:T[];pageParam:number;rawItems:object[]; },unknown>,Error>
resetUnviewedNotifications: () =>
void
Returns
void
Last updated