Better readable production equation

This commit is contained in:
SagePtr 2022-01-29 20:59:18 +02:00
parent 9ddb1c4379
commit 622ba0a2bd

@ -13,12 +13,12 @@ export function IndustryProductEquation(props: IProps): React.ReactElement {
if (reqAmt === undefined) continue;
reqs.push(String.raw`${reqAmt}\text{ }${reqMat}`);
}
const prod = props.division.prodMats.slice();
const prod = props.division.prodMats.map((p) => `1\\text{ }${p}`);
if (props.division.makesProducts) {
prod.push(props.division.type);
prod.push("Products");
}
return (
<MathJaxWrapper>{"\\(" + reqs.join("+") + `\\Rightarrow` + prod.map((p) => `1 \\text{${p}}`).join("+") + "\\)"}</MathJaxWrapper>
<MathJaxWrapper>{"\\(" + reqs.join("+") + `\\Rightarrow ` + prod.join("+") + "\\)"}</MathJaxWrapper>
);
}