created navigation store
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
var React = require('react');
|
||||
var ItemActions = require('../../actions/itemActions');
|
||||
var NavigationActions = require('../../actions/navigationActions');
|
||||
var NavigationStore = require('../../stores/navigationStore')
|
||||
|
||||
var Router = require('react-router');
|
||||
var Navigation = Router.Navigation;
|
||||
|
||||
var SingleItem = React.createClass({
|
||||
mixins: [Navigation],
|
||||
render: function() {
|
||||
var self = this;
|
||||
var itemClick = this.itemClick;
|
||||
@@ -21,9 +21,10 @@ var SingleItem = React.createClass({
|
||||
},
|
||||
|
||||
itemClick: function(e) {
|
||||
// no need for this to go through ItemActions
|
||||
NavigationActions.goToItemDetails(this.props.item);
|
||||
ItemActions.selectItem(this.props.item);
|
||||
//this.transitionTo('/artikal/' + this.props.item.get('id') +'/' + this.props.item.get('name'));
|
||||
console.log(this.props.item)
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user