reliability updates (test)
This commit is contained in:
+10
-2
@@ -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()} />;
|
||||
|
||||
Reference in New Issue
Block a user