Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
let { lang, image, name, statsKey, scale } = this.props;
const field = getField(statsKey);
const label = name ? name[lang] : translate(statsKey, lang);
const cn = classNames('avatar center', { scale });
return (
<div>
<img size="lg">
<div>{label}</div>
</div>
);
}
{fields.map(f => {
if (f === 'rarity') {
return (
<div>
{translate('rarity', lang)}
</div>
);
}
return <div>;
})}
</div>
{fields.map((field) => {
if (field === "rarity") {
return (
<div>
{translate("rarity", lang)}
</div>
);
}
return (
<div>
</div>
);
})}
{rows.map((row) => {
let { HP = 0, STR = 0, might = 0 } = details[row] || {};
return (
<div>
<div>{translate(row, lang)}</div>
<div>{HP}</div>
<div>{STR}</div>
<div>{might}</div>
</div>
);
})}
rows.map(row => {
const { HP, STR, might } = details[row];
return (
{translate(row, lang)}
{HP}
{STR}
{might}
);
})}