Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var React = require('react/addons');
var Cart = require('../../../common/components/Cart.jsx');
var FluxibleMixin = require('fluxible').Mixin;
var CartStore = require('../stores/CartStore');
var cartCheckout = require('../actions/cartCheckout');
var CartContainer = React.createClass({
mixins: [FluxibleMixin],
statics: {
storeListeners: {
_onChange: [CartStore]
}
},
_getStateFromStores: function () {
return {
products: this.getStore('CartStore').getAddedProducts(),
total: this.getStore('CartStore').getTotal()
'use strict';
var React = require('react/addons');
var ProductItem = require('../../../common/components/ProductItem.jsx');
var ProductsList = require('../../../common/components/ProductsList.jsx');
var FluxibleMixin = require('fluxible').Mixin;
var ProductStore = require('../stores/ProductStore');
var addToCart = require('../actions/addToCart');
var ProductItemContainer = React.createClass({
mixins: [FluxibleMixin],
onAddToCartClicked: function () {
this.executeAction(addToCart, {
product: this.props.product
});
},
render: function () {
return (
);
'use strict';
var React = require('react');
var CartContainer = require('./CartContainer.jsx');
var ProductsContainer = require('./ProductsContainer.jsx');
var FluxibleMixin = require('fluxible').Mixin;
var App = React.createClass({
mixins: [FluxibleMixin],
render: function () {
return (
<div>
</div>
);
}
});
module.exports = App;