import React from 'react'; import {inject, observer} from 'mobx-react'; import { Card, CardMedia, CardTitle, CardText, FontIcon, } from 'material-ui'; import NumberFormat from 'react-number-format'; import {Link} from 'react-router-dom'; import {LINKS} from "../../../routes"; import {appConfig} from "../../../config/app"; import get from 'lodash.get'; @inject('appstate') @observer export class ItemCard extends React.Component { constructor(props) { super(props); this.props = props; this.state = {}; this.defaultState = Object.assign({}, this.state); this.http = props.appstate.http; } componentDidMount() { // console.log('ItemCard'); } render() { const {data = {}} = this.props; const main = get(data,'images.main',null); // const mainImage = this.http.appendImagePath(main); const mainImage = main; return ( {/**/} {(data.name.length > 14) ? data.name.substring(0,13)+`...` : data.name}} titleStyle={{fontWeight: 'bold', fontSize: 18, lineHeight: '30px', whiteSpace: 'nowrap'}} subtitle={{data.regular_price} Points}/> {/*{(data.name.length > 14) ? data.name.substring(0,13)+`...` : data.name}} titleStyle={{fontWeight: 'bold', fontSize: 18, lineHeight: '30px', whiteSpace: 'nowrap'}}*/} {/*subtitle={}/>*/} {/**/} {/*

{data.name}

*/} {/*
*/} {/**/} {/*
Stock{data.stock}
*/} {/*
*/} {/*
*/}
Stock : {+data.stock} {data.uom}
remove_red_eye : {data.seen}
favorite_border : {data.wishlist}
Sold : {data.sold}
) } }