Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
<span>
{death.gold_delta > 0 ? <span> : <span>}
{/* nothing if === 0 */}
<font style="{{">{Math.abs(death.gold_delta)} </font>
<img src="{`${process.env.REACT_APP_API_HOST}/apps/dota2/images/tooltips/gold.png`}" alt="">
</span>
))}
}
<time>
{obj.type !== 'teamfight' && formatSeconds(obj.time)}
</time>
);
})
}</span></span>
const firstPurchase = row.first_purchase_time && row.first_purchase_time[itemKey];
if (items[itemKey]) {
itemArray.push(
inflictorWithValue(itemKey, formatSeconds(firstPurchase)),
);
}
// Use hero_id because Meepo showing up as an additional unit in some matches http://dev.dota2.com/showthread.php?t=132401
if (row.hero_id === 80 && row.additional_units) {
const additionalItemKey = itemIds[row.additional_units[0][`item_${i}`]];
const additionalFirstPurchase = row.first_purchase_time && row.first_purchase_time[additionalItemKey];
if (items[additionalItemKey]) {
additionalItemArray.push(
inflictorWithValue(additionalItemKey, formatSeconds(additionalFirstPurchase)),
);
}
}
}
return (
<div>
{itemArray && <div>{itemArray}</div>}
{additionalItemArray && <div>{additionalItemArray}</div>}
</div>
);
},
}, {
}
<time>{formatSeconds(match.duration)}</time>
<div>
{fTower &&
<div>
<span>{strings.match_first_tower} </span>
{formatSeconds(fTower)}
</div>
}
{fRax &&
<div>
<span>{strings.match_first_barracks} ({strings[`barracks_value_${fRax.key}`]}) </span>
{formatSeconds(fRax.time)}
</div>
}
</div>
);
}
return null;
};
displayFn: (row, col, _field) => (row.hero_id === '' ? formatSeconds(_field) : Number(_field).toLocaleString()),
}, {
displayFn: (row, col, field) => formatSeconds(field),
}, {
const rowStyle = { ...style,
backgroundColor: log.key % 2 === 0 ? styles.wardLogRowEvenSurfaceColor : styles.wardLogRowOddSurfaceColor,
};
return (
<li>
<img role="presentation" src="{`${API_HOST}/apps/dota2/images/items/ward_${log.type}_lg.png`}" height="29">
{heroTd(match.players[log.player])}
{formatSeconds(log.entered.time)}
{formatSeconds(log.left && log.left.time) || '-'}
{formatSeconds(duration)}
{wardKiller}
</li>
);
};
.map((purchase) => {
if (items[purchase.key]) {
return inflictorWithValue(purchase.key, formatSeconds(purchase.time));
}
return <span>;
}) : ''}
),</span>
format(x) {
return formatSeconds(x);
},
},
format() {
return formatTemplate(strings.story_item_purchase, {
time: formatSeconds(this.time),
player: PlayerSpan(this.player),
item: ItemSpan(this.item),
});
}
}
format() {
return formatTemplate(strings.story_expensive_item, {
time: formatSeconds(this.time),
player: PlayerSpan(this.player),
item: ItemSpan(this.item),
price_limit: GoldSpan(this.price_limit),
});
}
}