2022-12-17 08:54:27 +00:00
|
|
|
import React, { Suspense } from "react";
|
2022-02-16 20:30:12 +00:00
|
|
|
import ReactDOM from "react-dom";
|
|
|
|
import { HashRouter } from "react-router-dom";
|
|
|
|
import "./index.css";
|
2022-12-13 22:50:13 +00:00
|
|
|
import { ErrorBoundary } from "@/components/layout/ErrorBoundary";
|
2022-03-06 12:43:32 +00:00
|
|
|
import App from "./App";
|
2022-12-29 17:25:57 +00:00
|
|
|
import "./i18n";
|
|
|
|
import { conf } from "./config";
|
|
|
|
|
|
|
|
// initialize
|
|
|
|
const key =
|
|
|
|
(window as any)?.__CONFIG__?.VITE_KEY ?? import.meta.env.VITE_KEY ?? null;
|
|
|
|
if (key) {
|
|
|
|
(window as any).initMW(conf().BASE_PROXY_URL, key);
|
|
|
|
}
|
2021-07-13 22:31:37 +00:00
|
|
|
|
|
|
|
ReactDOM.render(
|
2022-02-16 20:30:12 +00:00
|
|
|
<React.StrictMode>
|
|
|
|
<ErrorBoundary>
|
|
|
|
<HashRouter>
|
2022-12-17 08:54:27 +00:00
|
|
|
<Suspense fallback="">
|
|
|
|
<App />
|
|
|
|
</Suspense>
|
2022-02-16 20:30:12 +00:00
|
|
|
</HashRouter>
|
|
|
|
</ErrorBoundary>
|
|
|
|
</React.StrictMode>,
|
|
|
|
document.getElementById("root")
|
2021-07-13 22:31:37 +00:00
|
|
|
);
|