fix: correct login entry routing and errors
This commit is contained in:
@@ -6,6 +6,17 @@ import '@/styles/tokens.css';
|
||||
import '@/styles/global.css';
|
||||
import '@/styles/components.css';
|
||||
|
||||
function normalizeInitialHashRoute() {
|
||||
if (window.location.hash) return;
|
||||
|
||||
const path = window.location.pathname;
|
||||
if (path === '/admin' || path.startsWith('/admin/') || path === '/client' || path.startsWith('/client/')) {
|
||||
window.history.replaceState(null, '', `/#${path}${window.location.search}`);
|
||||
}
|
||||
}
|
||||
|
||||
normalizeInitialHashRoute();
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
|
||||
<React.StrictMode>
|
||||
<HashRouter>
|
||||
|
||||
Reference in New Issue
Block a user