Hi, I have a button on my dynamic item page that works as a (add to bookmarks), but if it is clicked more than once by the user the same item is added several times. Is there a way to prevent this from happening?

This happens because they can not know if the item is already on the list or not, therefore idependente the button does not change the appearance to warn them. The only way to know if the item is already on the list is to open the list and search there. Can you do anything about it? Or am I wasting time?
The dynamic page item is placed in a separate database from the database that users have favorites.
below is the button code:
//Favorite button
export function button18_click() {
const item = $w('#dynamicDataset').getCurrentItem();
wixData.insert('AnimesFavoritos', { item });
}
One cheap way, disable the button when they click it 
export function button18_click() {
$w("#button18").disable();
const item = $w('#dynamicDataset').getCurrentItem();
wixData.insert('AnimesFavoritos', { item });
}
export function button18_click() {
$w("#button18").disable();
const item = $w('#dynamicDataset').getCurrentItem();
wixData.query("AnimesFavoritos")
.eq("_id", item._id)
.find()
.then((results) => {
if (results.totalCount > 0) {
// It exists
$w("#button18").disable();
$w("#button18").label = "Already added";
} else {
$w("#button18").disable();
wixData.insert('AnimesFavoritos', { item });
$w("#button18").label = "Added";
}
})
}
And what you should do is to run that query when the Dynamic Page loads to check and if they have added it just disable the button in the first place so they won’t be able to click it and change label to “Added” or “Remove from Favoritos” and if they did not add it “Add to Favoritos” and then it will be super.
I’ll try after the editor starts saving the updates again. XD
as this option add in a reference collection is not working what you passed me, now I am reading the reference api and trying another way.
the code that you passed me sends the item over and deactivates the button but when reloading the page the button is reactivated.
I tried to change wixData.query for wixData.queryReferenced but I do not think I understood correctly what I’m reading. XD