Skip to content

Add /stats url path redirect#12

Merged
pstaylor-patrick merged 20 commits intomainfrom
feat/stats
Nov 26, 2025
Merged

Add /stats url path redirect#12
pstaylor-patrick merged 20 commits intomainfrom
feat/stats

Conversation

@pstaylor-patrick
Copy link
Copy Markdown
Owner

... (in addition to the existing stats. subdomain redirect)

👋 TL;DR

Created new @f3muletown/redirects package with shared redirect utilities and added /stats route to web app for consistent redirection.

🔎 Details

  • Created new @f3muletown/redirects package with TypeScript config, Vitest setup, and test suite
  • Added getRegionRedirectUrl and getStatsRedirectUrl utility functions
  • Added /stats route to web app with proper testing and E2E coverage
  • Updated both stats and web apps to use shared redirect package instead of local implementations
  • Removed legacy redirect.ts file from web app
  • Configured Next.js transpilation for the shared redirects package in both apps
  • Improved E2E test reliability by using waitUntil: "commit" to avoid third-party asset timeouts

✅ How to Test

  1. Package Tests: Run pnpm test in the redirects package to verify utility functions
  2. Web App Redirects:
    • Navigate to / - should redirect to https://regions.f3nation.com/muletown
    • Navigate to /stats - should redirect to current year stats with location f3muletown
    • Navigate to any unknown route (e.g., /about) - should redirect to region home
  3. Stats App Redirect:
    • Navigate to / - should redirect to current year stats with location f3muletown
  4. E2E Tests: Run pnpm test:e2e in both apps to verify end-to-end redirect behavior
  5. Integration: Verify both apps build successfully with the shared redirect package

🥜 GIF

lack-of-hustle

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
f3muletown-stats Ready Ready Preview Comment Nov 25, 2025 3:54pm
f3muletown-website Ready Ready Preview Comment Nov 25, 2025 3:54pm

@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 25, 2025

Deploy Preview for precious-lolly-0aa3a0 failed.

Name Link
🔨 Latest commit 86f753d
🔍 Latest deploy log https://app.netlify.com/projects/precious-lolly-0aa3a0/deploys/6925d11709a4f800085b8eb3

@pstaylor-patrick pstaylor-patrick merged commit a749bbd into main Nov 26, 2025
9 of 13 checks passed
@pstaylor-patrick pstaylor-patrick deleted the feat/stats branch November 26, 2025 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant