blob: 35e7fceab58a577f3a85a653b5538d2e17fffa6a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
import { Main } from "./main";
import classNames from "classnames";
import ReactDOM from "react-dom";
const Base = ({}) => {
const name =
typeof location !== "undefined"
? decodeURIComponent(location.search.substring(1))
: null;
return <Main productName={name} />;
};
function startReact() {
ReactDOM.hydrate(<Base />, document.querySelector("#reactroot"));
}
if (typeof window !== "undefined") {
globalThis.addEventListener("DOMContentLoaded", () => {
startReact();
});
startReact();
}
export { Base };
|