Migrate Traefik Proxy dashboard UI to React
This commit is contained in:
parent
4790e4910f
commit
f16fff577a
324 changed files with 28303 additions and 19567 deletions
21
webui/src/index.tsx
Normal file
21
webui/src/index.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import { createRoot } from 'react-dom/client'
|
||||
|
||||
import App from './App'
|
||||
|
||||
async function enableMocking() {
|
||||
if (import.meta.env.MODE !== 'development') {
|
||||
return
|
||||
}
|
||||
|
||||
const { worker } = await import('./mocks/browser')
|
||||
|
||||
// `worker.start()` returns a Promise that resolves
|
||||
// once the Service Worker is up and ready to intercept requests.
|
||||
return worker.start()
|
||||
}
|
||||
|
||||
enableMocking().then(() => {
|
||||
const container = document.getElementById('root')
|
||||
const root = createRoot(container!)
|
||||
root.render(<App />)
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue