Adds a page to the current Wix user's list of favorite dashboard pages. If the Wix user doesn't have a list, the method creates a new list and adds the favorite page to it.
function addUserFavorite(favorite: Favorite): Promise<AddUserFavoriteResponse>;
Favorite page to add to the list.
import { favoriteList } from "@wix/dashboard-management";
async function addUserFavorite(favorite) {
const response = await favoriteList.addUserFavorite(favorite);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.