w-aura/src/main.ts
Aidar Shaikhutdin @makeweb.space a24343a18e feat: add app config from server
2023-06-20 14:02:35 +03:00

27 lines
576 B
TypeScript

import ReactDOM from 'react-dom/client'
import init from './init'
import 'react-circular-progressbar/dist/styles.css'
import './fonts.css'
import './index.css'
const getRootElement = (id: string): HTMLElement => {
const root = document.getElementById(id)
if (root) return root;
const element = document.createElement('div')
element.id = id
document.body.appendChild(element)
return element
}
const startApp = async () => {
const vdom = await init()
const rootElement = getRootElement('root')
ReactDOM.createRoot(rootElement).render(vdom)
}
startApp()