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