import React from 'react'; import { FrameType } from '../../model/frame-type'; import { IItem } from '../../model/item'; import { RarityColor } from '../../model/rarity-color'; import { ItemTextService } from '../../services'; import './price-list-item.scss'; interface IProps { data: IItem; } interface IState { price?: String; } export class PriceListItem extends React.Component { constructor(props: IProps) { super(props); this.state = {}; } componentDidMount() {} render() { const { icon, priceInfo, stackSize, typeLine, frameType } = this.props.data; const name = ItemTextService.filterName(typeLine); const fullText = ItemTextService.parseItem(this.props.data); const rarityColor = RarityColor[(FrameType[frameType] || '').toLowerCase()]; return (
console.log(this.props.data)}>
{name}
{stackSize && Stack Size: {stackSize}}
{priceInfo ? `${priceInfo.min || priceInfo.min_price} ${priceInfo.currency || priceInfo.currency_rec}` : ''}
); } }