You've already forked bilibili-subtitle
init
This commit is contained in:
22
src/main.tsx
Normal file
22
src/main.tsx
Normal 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 './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>
|
||||
)
|
Reference in New Issue
Block a user