mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
29 lines
730 B
TypeScript
29 lines
730 B
TypeScript
import React, { Suspense } from "react";
|
|
import ReactDOM from "react-dom";
|
|
import { HashRouter } from "react-router-dom";
|
|
import { ErrorBoundary } from "@/components/layout/ErrorBoundary";
|
|
import { conf } from "@/setup/config";
|
|
|
|
import App from "@/setup/App";
|
|
import "@/setup/i18n";
|
|
import "@/setup/index.css";
|
|
|
|
// 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);
|
|
}
|
|
|
|
ReactDOM.render(
|
|
<React.StrictMode>
|
|
<ErrorBoundary>
|
|
<HashRouter>
|
|
<Suspense fallback="">
|
|
<App />
|
|
</Suspense>
|
|
</HashRouter>
|
|
</ErrorBoundary>
|
|
</React.StrictMode>,
|
|
document.getElementById("root")
|
|
);
|