From 4974c0e303c9e46e283a37f3ee5acbca57ac664b Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 5 Jan 2026 19:06:54 +0100 Subject: [PATCH] fix: use internal redirect for /board/:slug on staging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed RedirectBoardSlug to use React Router's Navigate instead of window.location.href to a non-existent domain. Now /board/:slug redirects to /:slug/ within the same domain. Production (main branch) keeps /board/:slug unchanged. Staging (dev branch) supports both /board/:slug and /:slug patterns. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/App.tsx | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 4cb4d7e..2622786 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -112,21 +112,12 @@ const OptionalAuthRoute = ({ children }: { children: React.ReactNode }) => { }; /** - * Component to redirect old /board/:slug URLs to canvas.jeffemmett.com/:slug/ - * This handles legacy URLs from jeffemmett.com/board/* + * Component to redirect /board/:slug URLs to clean /:slug/ URLs + * Used on staging to support both old and new URL patterns */ const RedirectBoardSlug = () => { const { slug } = useParams<{ slug: string }>(); - - // Redirect to canvas.jeffemmett.com for the canonical board URL - useEffect(() => { - if (slug) { - window.location.href = `https://canvas.jeffemmett.com/${slug}/`; - } - }, [slug]); - - // Show loading while redirecting - return
Redirecting to canvas...
; + return ; };