-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tsx
31 lines (29 loc) · 947 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
// eslint-disable-line unicorn/filename-case
import React, {Suspense} from 'react';
import ReactDOM from 'react-dom/client';
import '@unocss/reset/tailwind.css';
import 'virtual:uno.css';
import {createBrowserRouter, RouterProvider} from 'react-router-dom';
import './index.css';
import Loading from './components/Loading.tsx';
import {UserProvider} from './components/UserProvider.tsx';
import {UpdateProvider} from './components/UpdateProvider.tsx';
import Routes from './Routes.tsx';
const router = createBrowserRouter(Routes);
ReactDOM.createRoot(document.querySelector('#root')!).render(
<React.StrictMode>
<UpdateProvider>
<UserProvider>
<Suspense
fallback={
<div className="h-screen w-screen">
<Loading />
</div>
}
>
<RouterProvider router={router} />
</Suspense>
</UserProvider>
</UpdateProvider>
</React.StrictMode>,
);