disable marketta1 is 2 is available.

This commit is contained in:
Olivier Gagnon 2021-10-17 18:20:23 -04:00
parent 7bda726e5f
commit 1b22f28bd8
4 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -16,7 +16,7 @@ interface IMarketTA2Props {
function MarketTA2(props: IMarketTA2Props): React.ReactElement { function MarketTA2(props: IMarketTA2Props): React.ReactElement {
const division = useDivision(); const division = useDivision();
if (!division.hasResearch("Market-TA.II")) return <></>; if (!division.hasResearch("Market-TA.II")) return <></>;
props.mat.marketTa2 = false;
const [newCost, setNewCost] = useState<number>(props.mat.bCost); const [newCost, setNewCost] = useState<number>(props.mat.bCost);
const setRerender = useState(false)[1]; const setRerender = useState(false)[1];
function rerender(): void { function rerender(): void {

@ -16,6 +16,7 @@ interface ITa2Props {
function MarketTA2(props: ITa2Props): React.ReactElement { function MarketTA2(props: ITa2Props): React.ReactElement {
const division = useDivision(); const division = useDivision();
if (!division.hasResearch("Market-TA.II")) return <></>; if (!division.hasResearch("Market-TA.II")) return <></>;
props.product.marketTa1 = false;
const markupLimit = props.product.rat / props.product.mku; const markupLimit = props.product.rat / props.product.mku;
const [value, setValue] = useState(props.product.pCost); const [value, setValue] = useState(props.product.pCost);
const setRerender = useState(false)[1]; const setRerender = useState(false)[1];