From ce72522314fc4604228731e408550d0757f06cfc Mon Sep 17 00:00:00 2001 From: Mashy Date: Wed, 4 Sep 2019 14:54:49 +1000 Subject: [PATCH] show components for skills --- client/src/components/info.component.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/components/info.component.jsx b/client/src/components/info.component.jsx index 547581aa..2696cadf 100644 --- a/client/src/components/info.component.jsx +++ b/client/src/components/info.component.jsx @@ -28,9 +28,16 @@ function InfoComponent(args) { const regEx = /(RedPower|BluePower|GreenPower|RedLife|BlueLife|GreenLife|SpeedStat)/; const infoDescription = reactStringReplace(fullInfo.description, regEx, match => shapes[match]()); + const itemSource = itemInfo.combos.filter(c => c.item === info); + const itemSourceInfo = itemSource.length + ? `${itemSource[0].components[0]} ${itemSource[0].components[1]} ${itemSource[0].components[2]}` + : false; + const itemRegEx = /(Red|Blue|Green)/; + const itemSourceDescription = reactStringReplace(itemSourceInfo, itemRegEx, match => shapes[match]()); return (

{fullInfo.item}

+

{itemSourceDescription}

{infoDescription}
);