soulsync/webui/src/app/main.tsx
Antti Kettunen 39f56fe63f
Promote shell context to the root route
- Wait for the legacy shell bridge/profile before React routes render
- Expose the shell bridge and profile through root TanStack context
- Update issue routes and shell helpers to consume the shared context
- Remove the redundant issues search normalization on read
- Refresh the affected tests around shell bootstrap and routing
2026-05-13 22:26:25 +03:00

23 lines
757 B
TypeScript

import '@vitejs/plugin-react/preamble';
import { createRoot } from 'react-dom/client';
import { bindWindowWebRouter } from '@/platform/shell/bridge';
import { ROUTER_ROOT_ID } from '@/platform/shell/route-controllers';
import { createAppQueryClient } from './query-client';
import { AppRouterProvider, createAppRouter } from './router';
export async function bootstrapApp() {
const container = document.getElementById(ROUTER_ROOT_ID);
if (!container) return null;
const queryClient = createAppQueryClient();
const router = createAppRouter({ queryClient });
bindWindowWebRouter(router);
createRoot(container).render(<AppRouterProvider router={router} queryClient={queryClient} />);
return { queryClient, router };
}
void bootstrapApp();