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:
Snarling
2023-01-03 07:38:14 -05:00
committed by GitHub
parent 77894cd9e5
commit dc0de2498b
188 changed files with 1559 additions and 2220 deletions
+3 -2
View File
@@ -76,6 +76,7 @@ import _functions from "lodash/functions";
import { Apr1 } from "./Apr1";
import { isFactionWork } from "../Work/FactionWork";
import { V2Modal } from "../utils/V2Modal";
import { MathJaxContext } from "better-react-mathjax";
const htmlLocation = location;
@@ -427,7 +428,7 @@ export function GameRoot(): React.ReactElement {
}
return (
<>
<MathJaxContext version={3} src={"dist/ext/MathJax-3.2.2/es5/tex-chtml.js"}>
<ErrorBoundary key={errorBoundaryKey} softReset={softReset}>
<BypassWrapper content={bypassGame ? mainPage : null}>
<SnackbarProvider>
@@ -467,6 +468,6 @@ export function GameRoot(): React.ReactElement {
</BypassWrapper>
</ErrorBoundary>
<V2Modal />
</>
</MathJaxContext>
);
}