Files
impstr/src/routes/index.tsx
Felix Förtsch f867934295 refactor impstr to react/vite stack, update deploy target
migrate from vanilla TypeScript + Bun bundler to React 19, Vite, TanStack Router,
Zustand, shadcn-style components, Tailwind v4, vite-plugin-pwa.

game logic moves into a Zustand store, UI into React feature components with
file-based routing. all 27 tests pass, biome lint clean.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 13:02:11 +01:00

16 lines
486 B
TypeScript

import { createFileRoute, redirect } from "@tanstack/react-router";
import { SetupScreen } from "../features/setup/setup-screen";
import { useGameStore } from "../shared/stores/game-store";
export const Route = createFileRoute("/")({
beforeLoad: () => {
const phase = useGameStore.getState().phase;
if (phase !== "setup") {
throw redirect({
to: `/${phase === "round" ? "round" : phase === "discussion" ? "discussion" : "done"}`,
});
}
},
component: SetupScreen,
});