mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-03 14:27:03 +02:00
CODEBASE: Generate display data for math notation at built time and remove runtime mathjax dependency (#2447)
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
import React from "react";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import { convertMathNotation } from "../root";
|
||||
|
||||
export function MathNotationOutput({ notation }: { notation: string }): JSX.Element {
|
||||
// It's fine to use dangerouslySetInnerHTML here. We control the data in both MathNotation.json and
|
||||
// MathNotationOutput.json. They are not user-provided data.
|
||||
return <Typography dangerouslySetInnerHTML={{ __html: convertMathNotation(notation) }} />;
|
||||
}
|
||||
Reference in New Issue
Block a user