Library: /pages (no id) shows the All-pages info view, not auto-opened page
release gate / check (push) Canceled after 1m2s
release gate / check (push) Canceled after 1m2s
- Remove the auto-select-first-page effect so the Library index (filters, folder path, relative edited label, click-to-edit) is actually reachable - Edited column uses Today/Yesterday/Mon D labels computed in the fetch callback - Update mobile regression + e2e to the new /pages landing (index, not editor)
This commit is contained in:
@@ -155,13 +155,8 @@ export function PagesClient({ initialId }: { initialId: string | null }) {
|
||||
editorRef.current?.resetContent(draft ?? data.content)
|
||||
}, [autosave])
|
||||
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => loadPages().then((data) => {
|
||||
if (!activePage.current && data.length) { activePage.current = data[0].id; setActiveId(data[0].id) }
|
||||
}).catch((e) => console.error('Failed to load pages', e)), 0)
|
||||
return () => clearTimeout(timer)
|
||||
}, [loadPages])
|
||||
|
||||
// /pages with no ?id is the Library "All pages" info view (library-index);
|
||||
// it must NOT auto-open the first page, or the index would never be seen.
|
||||
useEffect(() => {
|
||||
const timer = setTimeout(() => {
|
||||
if (activeId) loadPage(activeId).catch((e) => console.error('Failed to load page', e))
|
||||
|
||||
Reference in New Issue
Block a user