thetrevlore / Grace-Shopper

0 stars 1 forks source link

Iss 42 reroute user to order confirmation when order is placed #45

Closed thetrevlore closed 7 years ago

thetrevlore commented 7 years ago

Now, when the postOrder thunk is called, when an order is submitted from the cart component/view, in addition to creating the order in the database, redirects the user to a order confirmation page (rendering the OrderConfirmation component), passing along the successfully created order's id through the route params, to be displayed as the order number in the OrderConfirmation component/view.

There's potentially a better way to pass along the order id than using route params, but this was the simplest way that I thought of for now.