Wishlist
useGetFavoritesQuery
This function is used to fetch a list of favorite products.
The useGetFavoritesQuery function is imported from '@akinon/next/data/client/wishlist'
.
To fetch the list of favorite products, create a variable and call the function:
Following parameters can be sent to the function:
page: This value is used for pagination, indicating the page the user is currently on.
limit: It determines the limit of products on page the user is currently on.
Data returned from function:
count: It provides the total number of products that have been added to favorites.
next: This is used for pagination. If a user is on page 2, it contains the URL of page 3.
previous: This is used for pagination. If a user is on page 2, it contains the URL of page 1.
Last updated
Was this helpful?