Thursday, June 4, 2026

Confirm old league links only forward in the right situations

Volleyball Elite Academy development update
Volleyball Elite Academy
Confirm old league links only forward in the right situations

Confirm old league links only forward in the right situations

Volleyball Elite Academy — Development Update • June 4, 2026

--- title: Confirm old league links only forward in the right situations ---

Confirm old league links only forward in the right situations

## What & Why The in-app fallback that forwards legacy /league links (LeagueHostRedirect) is now tested at the component level, but the App's routing rules that decide WHEN that fallback is even shown are not. In App the fallback routes only mount when both and are true. A regression in that wiring could either (a) forward visitors when no standalone league site exists (sending them nowhere) or (b) silently stop forwarding old links — and the existing component test renders the fallback directly, bypassing that guard entirely.

## Done looks like - A test renders the App Router (or the relevant route block) and asserts the /league and /league/* routes mount the forwarder ONLY on the production academy host with a configured league host. - Asserts that on a dev host (or when no league host is configured) the same /league paths render the in-place league pages instead of forwarding. - Uses the same env/host stubbing pattern (vi.resetModules + vi.stubEnv("VITE_LEAGUE_DOMAINS", ...) + stubbed window.location) already used in client/src/components/__tests__/LeagueHostRedirect.test and client/src/hooks/__tests__/use-domain.test.

## Relevant files - (the guard around the /league and /league/* routes) - (HAS_LEAGUE_HOST / isLeague source) - (mocking pattern to reuse)

Volleyball Elite Academy

Reply to this email — we read every reply.

You received this because you have an account with Volleyball Elite Academy.

elitevolleyball.training

No comments:

Post a Comment