You'd just need to write a custom hit component wi...
# community-help
f
You'd just need to write a custom hit component with its own logic / hooks and use that as the hit component in your infinite hits widget. Or better yet build your own infinite hits widget altogether to handle calls to your primary datastore. I'd just receive all the hit ids and make a query to my data store to get the favorite flag for each. Otherwise just save every user that has favorited the product in an array inside the document and check for if the userId is inside that array, in order for you to display the according icon and make the necessary API call to your backend. A more interesting approach would be to use JOINs and have a link collection for productFavorites that has the userId and the product Id and filter by that JOIN, but that's all up to you
🙌 1
👍 1