error message show invalide commande

This commit is contained in:
Jean-Daniel Lamontagne 2022-11-13 16:56:38 -05:00
parent d3bc94a62a
commit 786ba6c28c

View File

@ -132,7 +132,6 @@ const ReviewInvoice = () => {
body: json
})
console.log(json);
if (response.ok) {
mySwal.fire({
title: 'Commande envoyée avec succès!',
@ -140,10 +139,17 @@ const ReviewInvoice = () => {
icon: "success"
})
cart.items = [];
navigate('./myinvoices');
navigate('./Morceaux');
}
else
else {
console.log("Erreur de creation la commande #" + thisInvoice.id);
mySwal.fire({
title: 'Erreur!',
timer: 2000,
icon: "error"
})
}
}
return (