Add local reference to mathjax context

This commit is contained in:
Martin Fournier
2022-01-08 07:48:10 -05:00
parent d2193e017d
commit 78a91d9997
6 changed files with 33 additions and 33 deletions
+3 -4
View File
@@ -9,7 +9,8 @@ import { purchaseRamForHomeComputer } from "../../Server/ServerPurchases";
import { Money } from "../../ui/React/Money";
import { numeralWrapper } from "../../ui/numeralFormat";
import { MathJax, MathJaxContext } from "better-react-mathjax";
import { MathJaxWrapper } from "../../MathJaxWrapper";
type IProps = {
p: IPlayer;
@@ -32,9 +33,7 @@ export function RamButton(props: IProps): React.ReactElement {
return (
<Tooltip
title={
<MathJaxContext>
<MathJax>{`\\(\\large{cost = 3.2 \\cdot 10^3 \\cdot 1.58^{log_2{(ram)}}}\\)`}</MathJax>
</MathJaxContext>
<MathJaxWrapper>{`\\(\\large{cost = 3.2 \\cdot 10^3 \\cdot 1.58^{log_2{(ram)}}}\\)`}</MathJaxWrapper>
}
>
<span>