Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onSuccess: () => {
queryCache.invalidateQueries(["polls.list"]);
queryCache.invalidateQueries(["polls.stats"]);
sendSuccessToast("Sondage envoyé.");
},
onError: (errorAsUnknown) => {
.then(() => queryCache.invalidateQueries("pages.get"));
},
useEffect(() => {
if (!listAttributes.hidden) {
return
}
queryCache.invalidateQueries(CACHE_KEY).then(() => {
if (!isMountedRef.current) {
return
}
setIsStale(false)
})
}, [listAttributes.hidden, isStale, isMountedRef])
newBasket[product.id].status = "error";
setBasket(newBasket);
sendErrorToast(`Erreur lors du passage de la commande : ${e}`);
error = true;
}
}
if (!error) {
setBasket({});
resetCustomer();
sendSuccessToast("Commande passée avec succès");
}
await queryCache.invalidateQueries("marketplace.transactions.list");
};
onSuccess: () => {
queryCache.invalidateQueries(["events.list"]);
sendSuccessToast("Inscription effectuée.");
},
onError: (errorAsUnknown) => {
onSuccess: () => {
queryCache.invalidateQueries(["associations.list"]);
sendSuccessToast("Association créée.");
history.push(`/parametres/associations`);
},
onError: (errorAsUnknown) => {
api.associations.setLogo(association.id, media?.id || null).then(() => {
queryCache.invalidateQueries("association.get");
});
};
onSuccess: () => {
queryCache.invalidateQueries(["associations.get"]);
sendSuccessToast("Association modifiée.");
},
onError: (errorAsUnknown) => {
onSuccess: () => {
queryCache.invalidateQueries(["roles.list"]);
sendSuccessToast("Rôle modifié.");
},
onError: (errorAsUnknown) => {
onSuccess: () => {
sendSuccessToast("Demande annulée.");
queryCache.invalidateQueries("loanables.list");
},
onError: () => sendErrorToast("L’annulation a échoué."),