reliability updates (test)

This commit is contained in:
2026-02-27 15:19:36 -06:00
parent 89b5063786
commit d825be0ee4
4 changed files with 327 additions and 305 deletions
+10 -2
View File
@@ -115,8 +115,16 @@ const App: Component = () => {
<Show when={getEmbedView() === 'embed_notes'}>
{(() => {
const noteIdFromUrl = createMemo(() => {
const params = new URLSearchParams(new URL(location()).search);
return params.get('noteId');
const loc = location();
const url = new URL(loc);
// Try standard search params
let id = url.searchParams.get('noteId');
if (!id && url.hash.includes('?')) {
// Try parsing from hash (for hash-based routing)
const hashSearch = url.hash.split('?')[1];
id = new URLSearchParams(hashSearch).get('noteId');
}
return id;
});
console.log('[DEBUG App] Rendering embed/notes context. noteId trace:', noteIdFromUrl());
return <NotepadView selectedNoteId={noteIdFromUrl()} setSelectedNoteId={() => { }} hideNavigation={!!noteIdFromUrl()} />;