fix building under linux

This commit is contained in:
user
2025-04-30 05:04:13 +00:00
parent 194df8525c
commit e900b11f05

22
src/Main.tsx Normal file
View File

@@ -0,0 +1,22 @@
import React from 'react'
import ReactDOM from 'react-dom/client'
import './index.less'
import store from './store'
import {Provider} from 'react-redux'
import Router from './Router'
import { APP_DOM_ID } from './consts/const'
const body = document.querySelector('body')
const app = document.createElement('div')
app.id = APP_DOM_ID
if (body != null) {
body.prepend(app)
}
ReactDOM.createRoot(document.getElementById(APP_DOM_ID) as HTMLElement).render(
<React.StrictMode>
<Provider store={store}>
<Router/>
</Provider>
</React.StrictMode>
)