From 95d7f9631ce987a309d60737855d7ac9bde8829d Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Fri, 2 Jan 2026 18:14:05 +0100 Subject: [PATCH] feat: add catch-all route for direct board slug URLs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added routes to handle direct slug URLs like canvas.jeffemmett.com/ccc These now redirect to /board/ccc/ to maintain backward compatibility with old links from jeffemmett.com/board/ccc 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/App.tsx | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index e2b7c6e..21ded6a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -28,6 +28,9 @@ import { ErrorBoundary } from './components/ErrorBoundary'; import CryptID from './components/auth/CryptID'; import CryptoDebug from './components/auth/CryptoDebug'; +// Import Web3 provider for wallet integration +import { Web3Provider } from './providers/Web3Provider'; + // Import Google Data test component import { GoogleDataTest } from './components/GoogleDataTest'; @@ -116,6 +119,15 @@ const RedirectBoardSlug = () => { return ; }; +/** + * Component to redirect direct slug URLs to board URLs + * Handles canvas.jeffemmett.com/ccc → /board/ccc/ + */ +const RedirectDirectSlug = () => { + const { slug } = useParams<{ slug: string }>(); + return ; +}; + /** * Main App with context providers */ @@ -142,11 +154,12 @@ const AppWithProviders = () => { return ( - - - }> - - + + + + }> + + {/* Display notifications */} @@ -209,13 +222,20 @@ const AppWithProviders = () => { {/* Google Data routes */} } /> } /> + + {/* Catch-all: Direct slug URLs redirect to board URLs */} + {/* e.g., canvas.jeffemmett.com/ccc → /board/ccc/ */} + {/* Must be LAST to not interfere with other routes */} + } /> + } /> - - - - - + + + + + + );