Add frontend functionality for favorite.