soulsync/webui/src/routes/index.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

19 lines
579 B
TypeScript

import { createFileRoute, redirect } from '@tanstack/react-router';
import { getProfileHomePath } from '@/platform/shell/bridge';
import { LegacyRouteController } from '@/platform/shell/route-controllers';
export const Route = createFileRoute('/')({
beforeLoad: ({ context, location }) => {
if (location.pathname !== '/') return;
const { bridge } = context.shell;
throw redirect({ href: getProfileHomePath(bridge), replace: true });
},
component: IndexRouteComponent,
});
function IndexRouteComponent() {
return <LegacyRouteController pathname="/" />;
}