forked from libnyanpasu/clash-nyanpasu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tsx
37 lines (32 loc) · 976 Bytes
/
main.tsx
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
26
27
28
29
30
31
32
33
34
35
36
37
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />
import "./assets/styles/index.scss";
import { ResizeObserver } from "@juggle/resize-observer";
if (!window.ResizeObserver) {
window.ResizeObserver = ResizeObserver;
}
import React from "react";
import { createRoot } from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import { RecoilRoot } from "recoil";
import { BaseErrorBoundary } from "./components/base";
import Layout from "./pages/_layout";
import "./services/i18n";
const mainElementId = "root";
const container = document.getElementById(mainElementId);
if (!container) {
throw new Error(
`No container '${mainElementId}' found to render application`,
);
}
createRoot(container).render(
<React.StrictMode>
<RecoilRoot>
<BaseErrorBoundary>
<BrowserRouter>
<Layout />
</BrowserRouter>
</BaseErrorBoundary>
</RecoilRoot>
</React.StrictMode>,
);