refactoring working, will need to reorganize stuff a little bit

This commit is contained in:
Edin Dazdarevic
2015-01-25 12:52:31 +01:00
parent 2ad4e4a766
commit 769230eda1
12 changed files with 83 additions and 142 deletions

View File

@@ -1,12 +1,12 @@
var React = require('react');
var ItemActions = require('../actions/itemActions');
var Router = require('react-router');
var Navigation = Router.Navigation;
var SingleItem = React.createClass({
mixins: [Navigation],
render: function() {
var self = this;
var itemClick = this.itemClick;
@@ -22,7 +22,9 @@ var SingleItem = React.createClass({
},
itemClick: function(e) {
ItemActions.selectItem(this.props.item);
// no need for this to go through ItemActions
//ItemActions.selectItem(this.props.item);
this.transitionTo('/artikal/' + this.props.item.get('id') +'/' + this.props.item.get('name'));
}
});