Merge pull request #3501 from mmadrid/main

add query string to /home to preserve active Search
This commit is contained in:
Jackson Harper 2024-02-05 17:37:01 +08:00 committed by GitHub
commit 20f1a5e02f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -89,7 +89,9 @@ export default function Home(): JSX.Element {
// return
// }
// }
router.push(`/home`)
const query = window.sessionStorage.getItem('q')
router.push(`/home?${query}`)
// router.push(`/home`)
}, [router, viewerData, article])
const goPreviousOrHome = useCallback(() => {
@ -103,7 +105,9 @@ export default function Home(): JSX.Element {
// return
// }
// }
router.push(`/home`)
const query = window.sessionStorage.getItem('q')
router.push(`/home?${query}`)
// router.push(`/home`)
}, [router, viewerData, article])
const actionHandler = useCallback(