In the last lecture, we were able to implement that we are redirected, now however we can see that
our price never is reset once we are redirected, so once we are done, we had that issue before already.
Now the price never resets because in our burger builder reducer where we manage the total price,
we only update the price when we add or remove ingredients but we never reset it when we call setIngredients,
the setIngredient action is dispatched whenever this page is loaded
though, we do it in the burger builder componentDidMount hook and that is on purpose, I want to load
my ingredients and reset them whenever this component gets mounted.
Now for that reason since we're doing it here, we have the issue of not updating the price,
we can easily fix this. In the burger builder reducer when we call setIngredients and update the ingredients,
we simply also have to update the total price and we could get this value from a server too or we simply
hardcode it to form which is our initial price up here too. With that if we save this, now we will have an updated
price,
so now if I quickly build a delicious cheese bacon burger and just enter any data here to get the job
done, let's switch to dropdown to mix things up, if I order this, you see the price is now always reset and all
of that without any errors.
So with that we got the burger builder and the order workflow managed through redux,
now of course it's also time to work on the orders page. For that, I'll first of all clear all the orders
on firebase again.