diff --git a/src/pages/Upload.tsx b/src/pages/Upload.tsx index 6caabf5..08c2d94 100644 --- a/src/pages/Upload.tsx +++ b/src/pages/Upload.tsx @@ -226,7 +226,9 @@ export default function Upload() { return; } + console.log('waiting for pages'); const nextPages = await Promise.all(uploadPromises); + console.log('pages done') const nextNotes = nextPages.map((_, pageIndex) => ({ pageIndices: [pageIndex] as [number, ...number[]], markdown: '', @@ -234,7 +236,6 @@ export default function Upload() { setPages(nextPages); setNotes(nextNotes); - setUploadState('setting pages'); } @@ -248,12 +249,14 @@ export default function Upload() { } setSavingState('saving'); + console.log('updating doc with pages') await updateDoc(presentationRef, { pages, rendered: new Date(), title, notes, } satisfies PresentationUpdate); + console.log('doc update done') setUploadState('done'); setSavingState((currentState) => currentState === 'saving' ? 'saved' : currentState,