Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to cart back #58

Merged
merged 5 commits into from
Sep 11, 2019
Merged

Add to cart back #58

merged 5 commits into from
Sep 11, 2019

Conversation

YousefQawasmeh
Copy link
Collaborator

relates #57

{!loading ? (
myProducts.length > 0 ? (
myProducts.map(e => (
<Link to={'/product/' + e.id + this.state.path1}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add (e.id) as a Key for the link.
see issue #59

@@ -16,9 +17,22 @@ class AddQuantityCart extends Component {
axios
.post('/add-to-cart', productInfo)
.then(response => {
console.log(response, 'done, added to cart')
swal({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if the response in the backend first before calling the swal message

@ishak52 ishak52 merged commit 43d845d into master Sep 11, 2019
@ishak52 ishak52 deleted the addToCartBack branch September 11, 2019 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants