1👍
I just added data in my commit function
async mounted() {
try {
// console.log(shipment)
let response = await axios.post("http://localhost:5000/api/shipment", {
shipment: normal
});
console.log(response)
this.$store.commit("setShipping", {
price: response.data.shipment.price,
estimatedDelivery: response.data.shipment.estimated
});
this.price = response.shipment.price;
this.estimatedDelivery = response.shipment.estimated;
} catch (err) {
console.log(err)
}
}
Source:stackexchange.com