fix: handle trailing slash on /guide/ route (refs #203)
All checks were successful
Deploy to Staging / Build Images (pull_request) Successful in 3m29s
Deploy to Staging / Deploy to Staging (pull_request) Successful in 53s
Deploy to Staging / Verify Staging (pull_request) Successful in 9s
Deploy to Staging / Notify Staging Ready (pull_request) Successful in 8s
Deploy to Staging / Notify Staging Failure (pull_request) Has been skipped

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Eric Gullickson
2026-02-15 17:51:47 -06:00
parent a7f12ad580
commit b73bfaf590

View File

@@ -371,7 +371,7 @@ function App() {
// Skip on auth routes -- their query params must survive until Auth0 SDK processes them
useEffect(() => {
const path = window.location.pathname;
if (path === '/callback' || path === '/signup' || path === '/verify-email' || path === '/guide') return;
if (path === '/callback' || path === '/signup' || path === '/verify-email' || path === '/guide' || path === '/guide/') return;
const screen = routeToScreen[path];
if (screen && screen !== activeScreen) {
navigateToScreen(screen, { source: 'url-sync' });
@@ -383,7 +383,7 @@ function App() {
// Auth0 SDK needs for handleRedirectCallback (child effects fire before parent effects)
useEffect(() => {
const path = window.location.pathname;
if (path === '/callback' || path === '/signup' || path === '/verify-email' || path === '/guide') return;
if (path === '/callback' || path === '/signup' || path === '/verify-email' || path === '/guide' || path === '/guide/') return;
const targetPath = screenToRoute[activeScreen];
if (targetPath && path !== targetPath) {
window.history.replaceState(null, '', targetPath);
@@ -502,7 +502,7 @@ function App() {
const isSignupRoute = location.pathname === '/signup';
const isVerifyEmailRoute = location.pathname === '/verify-email';
const isOnboardingRoute = location.pathname === '/onboarding';
const isGuideRoute = location.pathname === '/guide';
const isGuideRoute = location.pathname === '/guide' || location.pathname === '/guide/';
const isAuthRoute = isSignupRoute || isVerifyEmailRoute || isOnboardingRoute;
const shouldShowHomePage = !isGarageRoute && !isCallbackRoute && !isAuthRoute && !isGuideRoute;