var React = require('react'); var ItemActions = require('../../actions/itemActions'); var NavigationActions = require('../../actions/navigationActions'); var NavigationStore = require('../../stores/navigationStore'); var Globals = require('../../globals'); var Router = require('react-router'); var SingleItem = React.createClass({ render: function() { var hidePrice = this.props.hidePrice || false; var self = this; var itemClick = this.itemClick; var stopPropagation = this.stopPropagation; var itemUrl = NavigationStore.getUrlForItem(this.props.item); var firstImage = this.props.item.get('multi_media_descriptions')[0]; firstImage = firstImage || { resized_url: "https://res.cloudinary.com/lfvt7ps2n/image/upload/c_fit,h_172,w_226/v1421732950/http_www.asms.ru_bitrix_templates_main_images_nophoto_irnofq.png" } ; if (hidePrice) { return (
product image

{ this.props.item.get('brand') ? this.props.item.get('brand').name : '' }

{ this.props.item.get('name') }

); } else { return (
product image

{ this.props.item.get('brand') ? this.props.item.get('brand').name : '' }
{ this.props.item.get('name') }

{ Globals.FormatCurrency(this.props.item.get('list_price')) }

); } }, stopPropagation: function(e){ e.stopPropagation(); e.nativeEvent.stopImmediatePropagation(); return false; }, itemClick: function(e) { NavigationActions.goToItemDetails(this.props.item); } }); module.exports = SingleItem;