diff --git a/src/PageManager.tsx b/src/PageManager.tsx index 13ca4fa..7c69c91 100644 --- a/src/PageManager.tsx +++ b/src/PageManager.tsx @@ -258,14 +258,8 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) { } const pushSecondaryPage = (url: string, index?: number) => { - console.log('🔗 pushSecondaryPage called with:', url) setSecondaryStack((prevStack) => { - console.log('🔗 Current stack:', prevStack.map(item => ({ url: item.url, index: item.index }))) - const isCurrent = isCurrentPage(prevStack, url) - console.log('🔗 Is current page?', isCurrent) - - if (isCurrent) { - console.log('🔗 URL is current page, scrolling to top instead of navigating') + if (isCurrentPage(prevStack, url)) { const currentItem = prevStack[prevStack.length - 1] if (currentItem?.ref?.current) { currentItem.ref.current.scrollToTop('instant') @@ -273,10 +267,8 @@ export function PageManager({ maxStackSize = 5 }: { maxStackSize?: number }) { return prevStack } - console.log('🔗 Creating new page for URL:', url) const { newStack, newItem } = pushNewPageToStack(prevStack, url, maxStackSize, index) if (newItem) { - console.log('🔗 Pushing to history:', url) window.history.pushState({ index: newItem.index, url }, '', url) } return newStack diff --git a/src/components/Note/index.tsx b/src/components/Note/index.tsx index 932ed1a..30148ea 100644 --- a/src/components/Note/index.tsx +++ b/src/components/Note/index.tsx @@ -149,26 +149,16 @@ export default function Note({