fix notification url replacement
This commit is contained in:
parent
8a5cd32be6
commit
4e41f67e87
|
@ -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])
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue