From bde9cc7047b06e6f79f3ed9dac2eb82998f565a2 Mon Sep 17 00:00:00 2001 From: Timothy Cardoza Date: Fri, 27 Feb 2026 17:18:37 -0600 Subject: [PATCH] correction for production embed envirnments --- src/App.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index c15edc4..34eb022 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -115,8 +115,14 @@ const App: Component = () => { {(() => { const noteIdFromUrl = createMemo(() => { - const params = new URLSearchParams(new URL(location()).search); - return params.get('noteId'); + const urlObj = new URL(location()); + let noteId = new URLSearchParams(urlObj.search).get('noteId'); + // Production likely uses hash routing, so check hash for query params too + if (!noteId && urlObj.hash.includes('?')) { + const hashQueryString = urlObj.hash.substring(urlObj.hash.indexOf('?')); + noteId = new URLSearchParams(hashQueryString).get('noteId'); + } + return noteId; }); console.log('[DEBUG App] Rendering embed/notes context. noteId trace:', noteIdFromUrl()); return { }} hideNavigation={!!noteIdFromUrl()} />;