import {StrictMode} from 'react'
import {createRoot} from 'react-dom/client'
import {BrowserRouter, Route, Routes} from 'react-router-dom'
import './index.css'
import App from './App.tsx'
import {DebugScreen} from './screens'

function DebugWrapper() {
    return <DebugScreen onBack={() => window.location.href = '/badge'}/>
}

createRoot(document.getElementById('root')!).render(
    <StrictMode>
        <BrowserRouter basename="/badge">
            <Routes>
                <Route path="/" element={<App/>}/>
                <Route path="/debug" element={<DebugWrapper/>}/>
            </Routes>
        </BrowserRouter>
    </StrictMode>,
)
