var React = require('react'),
CartStore = require('../../stores/cartStore'),
AddToCart = require('../cart/addToCart'),
CartActions = require('../../actions/cartActions'),
NavigationActions = require('../../actions/navigationActions'),
SingleItem = require('../items/singleItem'),
Globals = require('../../globals'),
CartTotal = require('./cartTotal');
var Router = require('react-router');
var CheckoutPage = React.createClass({
render: function() {
return (
);
},
// Add change listeners to stores
componentDidMount: function() {
CartStore.addChangeListener(this._onChange);
CartActions.load();
},
componentWillUnmount: function () {
CartStore.removeChangeListener(this._onChange);
},
_onChange: function () {
if (this.isMounted()) {
this.setState(CartStore.getWholeCartState());
}
},
_onOrderClick: function () {
//NavigationActions.goToCheckout();
},
getInitialState: function () {
return CartStore.getWholeCartState();
}
});
module.exports = CheckoutPage;