mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-13 07:34:36 +01:00
29 lines
581 B
TypeScript
29 lines
581 B
TypeScript
import React from 'react'
|
|
import ReactDOM from 'react-dom/client'
|
|
|
|
import './index.css'
|
|
import App from './ui/App'
|
|
import Debug from './ui/Debug'
|
|
|
|
import { getConfigOption } from './utils/configuration'
|
|
|
|
const root = ReactDOM.createRoot(
|
|
document.getElementById('root') as HTMLElement
|
|
)
|
|
|
|
let isDebug = false;
|
|
|
|
(async() => {
|
|
isDebug = await getConfigOption('debug_enabled')
|
|
})
|
|
|
|
root.render(
|
|
<React.StrictMode>
|
|
{
|
|
isDebug ? <Debug /> : <App />
|
|
}
|
|
</React.StrictMode>
|
|
)
|
|
|
|
import reportWebVitals from './utils/reportWebVitals'
|
|
isDebug && reportWebVitals(console.log) |