Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
+45
@@ -0,0 +1,45 @@
|
||||
import { useLayoutEffect } from "react";
|
||||
|
||||
import { SheetProvider } from "~/subApps/sheet/contexts/Sheet";
|
||||
|
||||
import ErrorBoundary from "../../../Shared/components/ErrorBoundary";
|
||||
import CharacterSheet from "../CharacterSheet";
|
||||
|
||||
export function CharacterSheetContainer({
|
||||
authEndpoint,
|
||||
}: {
|
||||
authEndpoint: string;
|
||||
}) {
|
||||
useLayoutEffect(() => {
|
||||
document
|
||||
.getElementsByTagName("body")[0]
|
||||
.classList.add(
|
||||
"site",
|
||||
"body-rpgcharacter-sheet",
|
||||
"site-dndbeyond",
|
||||
"body-rpgcharacter",
|
||||
"body-rpgcharacter-details"
|
||||
);
|
||||
return () => {
|
||||
document
|
||||
.getElementsByTagName("body")[0]
|
||||
.classList.remove(
|
||||
"site",
|
||||
"body-rpgcharacter-sheet",
|
||||
"site-dndbeyond",
|
||||
"body-rpgcharacter",
|
||||
"body-rpgcharacter-details"
|
||||
);
|
||||
};
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<SheetProvider>
|
||||
<CharacterSheet authEndpoint={authEndpoint} />
|
||||
</SheetProvider>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
}
|
||||
|
||||
export default CharacterSheetContainer;
|
||||
Reference in New Issue
Block a user