tidy up descriptions
This commit is contained in:
@@ -70,7 +70,8 @@ class InfoComponent extends preact.Component {
|
||||
|
||||
if (isSkill) {
|
||||
const regEx = /(RedPower|BluePower|GreenPower|RedLife|BlueLife|GreenLife|SpeedStat)/;
|
||||
const infoDescription = reactStringReplace(fullInfo.description, regEx, match => shapes[match]());
|
||||
let infoDescription = reactStringReplace(fullInfo.description, regEx, match => shapes[match]());
|
||||
infoDescription = reactStringReplace(infoDescription, '\n', () => <br />);
|
||||
const itemSource = itemInfo.combos.filter(c => c.item === removeTier(info));
|
||||
const itemSourceInfo = itemSource.length
|
||||
? `${itemSource[0].components[0]} ${itemSource[0].components[1]} ${itemSource[0].components[2]}`
|
||||
@@ -176,7 +177,8 @@ class InfoComponent extends preact.Component {
|
||||
);
|
||||
});
|
||||
const regEx = /(RedPower|BluePower|GreenPower|RedLife|BlueLife|GreenLife|SpeedStat)/;
|
||||
const infoDescription = reactStringReplace(fullInfo.description, regEx, match => shapes[match]());
|
||||
let infoDescription = reactStringReplace(fullInfo.description, regEx, match => shapes[match]());
|
||||
infoDescription = reactStringReplace(infoDescription, '\n', () => <br />);
|
||||
const itemSource = itemInfo.combos.filter(c => c.item === info);
|
||||
let itemSourceInfo = itemSource.length
|
||||
? `${itemSource[0].components[0]} ${itemSource[0].components[1]} ${itemSource[0].components[2]}`
|
||||
@@ -202,10 +204,11 @@ class InfoComponent extends preact.Component {
|
||||
);
|
||||
}
|
||||
const cost = fullInfo.cost ? `- ${fullInfo.cost}b` : false;
|
||||
const infoDescription = reactStringReplace(fullInfo.description, '\n', () => <br />);
|
||||
return (
|
||||
<div class="info-item">
|
||||
<h2>{fullInfo.item} {cost}</h2>
|
||||
<div>{fullInfo.description}</div>
|
||||
<div>{infoDescription}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user