integrate favorite/unfavorite feature in the frontend