Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Commit

Permalink
fix: Redirect to checkout not cart (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
notrab committed Mar 8, 2018
1 parent d5947c9 commit 0554c74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Checkout/OneClickCheckout.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ class OneClickCheckout extends Component {
const { match: { params }, history, addToCart } = this.props;

if (!params.productId) {
history.push('/cart');
history.push('/checkout');
}

await addToCart(params.productId, 1);

history.push('/cart');
history.push('/checkout');
}

render() {
Expand Down

0 comments on commit 0554c74

Please sign in to comment.