From 2e4ba3ba1ed7881ffa64ed0b85c714efe18eb3f8 Mon Sep 17 00:00:00 2001 From: Silberengel Date: Sat, 11 Oct 2025 00:21:57 +0200 Subject: [PATCH] clean up debugging --- src/PageManager.tsx | 10 +--------- src/components/Note/index.tsx | 18 ++++-------------- 2 files changed, 5 insertions(+), 23 deletions(-) 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({
{event.kind === ExtendedKind.DISCUSSION && ( - <> - {console.log('🔍 Discussion button should render:', { eventKind: event.kind, discussionKind: ExtendedKind.DISCUSSION })} - - + > + + )} {size === 'normal' && (