Files
bilibili-subtitle/src/main.tsx
IndieKKY 50e6579116 fix
2024-10-06 17:51:07 +08:00

23 lines
563 B
TypeScript

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>
)