Hi,
Some dynamic page was working fine, until I put some code that intends to add a label to the contact when a button is clicked
But when the code is addedd from https://www.wix.com/velo/reference/wix-crm-backend/contacts-obj/labelcontact, multiple " is registered as a static event handler but is not exported from the page code" warnings appear and the dynamic page stop working as it should
I have no clue why that warnings appear, or what is wrong with my code
A hand would be great
at the top of the code ( This line seems to be causing all the trouble )
import { contacts } from 'wix-crm-backend';
when a button is clicked
{myLabelContactFunction()} ;
function myLabelContactFunction() {
const contactId = userId;
const labelKeys = [
"Clubbituser",
];
const options = {
suppressAuth: false
};
return contacts.labelContact(contactId, labelKeys, options)
.then((labeledContact) => {
return labeledContact;
})
.catch((error) => {
console.error(error);
});
}