add query string to /home to preserve active Search
This commit is contained in:
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user