non fuctional add to cart part created
This commit is contained in:
40
front-ui/app/components/cart/addToCart.js
Normal file
40
front-ui/app/components/cart/addToCart.js
Normal file
@@ -0,0 +1,40 @@
|
||||
var React = require('react');
|
||||
|
||||
|
||||
var AddToCart = React.createClass({
|
||||
|
||||
render: function() {
|
||||
return (
|
||||
<div className="row-fluid add-to-cart">
|
||||
<div className="col-xs-offset-1 col-xs-1"><button className="btn btn-success">+</button></div>
|
||||
<div className="col-xs-1"><button className="btn"> 2 </button></div>
|
||||
<div className="col-xs-1"><button className="btn btn-success">-</button></div>
|
||||
<div className="col-xs-8"><button className="btn btn-warning">U korpu</button></div>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
||||
// Add change listeners to stores
|
||||
componentDidMount: function() {
|
||||
/*ItemActions.loadFrontPageItems();
|
||||
ItemStore.addChangeListener(this._onChange); */
|
||||
},
|
||||
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
//items: ItemStore.getItems()
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
_onChange: function () {
|
||||
if (this.isMounted()) {
|
||||
/* this.setState({
|
||||
items: ItemStore.getItems()
|
||||
}); */
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = AddToCart;
|
||||
Reference in New Issue
Block a user