diff --git a/components/comment.js b/components/comment.js index 3b1c0bc5..b796762e 100644 --- a/components/comment.js +++ b/components/comment.js @@ -116,10 +116,6 @@ export default function Comment ({ setTimeout(() => { ref.current.scrollIntoView({ behavior: 'instant', block: 'start' }) ref.current.classList.add('outline-it') - router.replace({ - pathname: router.pathname, - query: { id: router.query.id } - }, undefined, { scroll: false }) }, 20) } }, [item]) diff --git a/components/notifications.js b/components/notifications.js index 54d7fb7f..5f4cb174 100644 --- a/components/notifications.js +++ b/components/notifications.js @@ -329,8 +329,15 @@ export default function Notifications ({ ssrData }) { useEffect(() => { if (lastChecked && !checkedAt) { - router.push({ query: { ...router.query, checkedAt: lastChecked } }, - router.asPath, { shallow: true }) + router.replace({ + pathname: router.pathname, + query: { + ...router.query, + nodata: true, // make sure nodata is set so we don't fetch on back/forward + checkedAt: lastChecked + } + }, + router.asPath, { ...router.options, shallow: true }) client?.writeQuery({ query: HAS_NOTIFICATIONS, data: {