mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-06 07:37:56 +02:00
Fix mathjax error (#287)
* Updated mathjax and better-react-mathjax * Removed MathJaxWrapper. Per better-react-mathjax documentation, we were incorrectly including a new context for every equation using this wrapper. * Wrapped entire game in a MathJaxContext at GameRoot.
This commit is contained in:
@@ -6,7 +6,7 @@ import Typography from "@mui/material/Typography";
|
||||
import { Player } from "@player";
|
||||
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { MathJaxWrapper } from "../../MathJaxWrapper";
|
||||
import { MathJax } from "better-react-mathjax";
|
||||
|
||||
type IProps = {
|
||||
rerender: () => void;
|
||||
@@ -30,7 +30,7 @@ export function CoresButton(props: IProps): React.ReactElement {
|
||||
}
|
||||
|
||||
return (
|
||||
<Tooltip title={<MathJaxWrapper>{`\\(\\large{cost = 10^9 \\cdot 7.5 ^{\\text{cores}}}\\)`}</MathJaxWrapper>}>
|
||||
<Tooltip title={<MathJax>{`\\(\\large{cost = 10^9 \\cdot 7.5 ^{\\text{cores}}}\\)`}</MathJax>}>
|
||||
<span>
|
||||
<br />
|
||||
<Typography>
|
||||
|
||||
@@ -10,7 +10,7 @@ import { purchaseRamForHomeComputer } from "../../Server/ServerPurchases";
|
||||
import { Money } from "../../ui/React/Money";
|
||||
import { numeralWrapper } from "../../ui/numeralFormat";
|
||||
|
||||
import { MathJaxWrapper } from "../../MathJaxWrapper";
|
||||
import { MathJax } from "better-react-mathjax";
|
||||
import { BitNodeMultipliers } from "../../BitNode/BitNodeMultipliers";
|
||||
|
||||
type IProps = {
|
||||
@@ -35,7 +35,7 @@ export function RamButton(props: IProps): React.ReactElement {
|
||||
return (
|
||||
<Tooltip
|
||||
title={
|
||||
<MathJaxWrapper>{`\\(\\large{cost = ram \\cdot 3.2 \\cdot 10^4 \\cdot 1.58^{log_2{(ram)}}} ${bnMult}\\)`}</MathJaxWrapper>
|
||||
<MathJax>{`\\(\\large{cost = ram \\cdot 3.2 \\cdot 10^4 \\cdot 1.58^{log_2{(ram)}}} ${bnMult}\\)`}</MathJax>
|
||||
}
|
||||
>
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user