diff --git a/GrossesMitaines/grosses-mitaines-ui/src/components/App.js b/GrossesMitaines/grosses-mitaines-ui/src/components/App.js
index 5618883..22d56e6 100644
--- a/GrossesMitaines/grosses-mitaines-ui/src/components/App.js
+++ b/GrossesMitaines/grosses-mitaines-ui/src/components/App.js
@@ -52,7 +52,7 @@ const App = () => {
} />
} />
} />
- } />
+ } />
diff --git a/GrossesMitaines/grosses-mitaines-ui/src/pages/Formulaire.js b/GrossesMitaines/grosses-mitaines-ui/src/pages/Formulaire.js
index c3cd565..f410c27 100644
--- a/GrossesMitaines/grosses-mitaines-ui/src/pages/Formulaire.js
+++ b/GrossesMitaines/grosses-mitaines-ui/src/pages/Formulaire.js
@@ -58,23 +58,13 @@ export default function App() {
console.log("Your cart is empty!!!");
}
else {
- data.prodQuant ={};
+ data.prodQuant = {};
cart.map((p) => {
- data.prodQuant[p.id] = p.quantity;
+ data.prodQuant[`${p.id}`] = p.quantity;
});
- console.log(data);
-
- const jsonData = JSON.stringify(data);
-
- fetch("https://localhost:7292/api/Invoice", {
- mode: "cors",
- method: "POST",
- credentials: "include",
- body: jsonData
- }).then((response) => {
- console.log(response);
- });
+ cookies.set('invoice', data, { path: '/', SameSite: 'strict', secure: true, maxAge: 2592000 });
+ navigate("/reviewinvoice");
}
}