mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Replacing .html
This commit is contained in:
parent
eec6f420b6
commit
373adb1597
1 changed files with 5 additions and 3 deletions
|
@ -22,10 +22,12 @@ export default function AllQuestions({ router }) {
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
setData(data)
|
setData(data)
|
||||||
})
|
})
|
||||||
setSearchTerm(router.query.q ? decodeURIComponent(router.query.q) : '')
|
const querySearch = router.query.q ? decodeURIComponent(router.query.q) : ''
|
||||||
|
setSearchTerm(querySearch)
|
||||||
router.replace(
|
router.replace(
|
||||||
`${router.pathname.replace('.html', '')}${e.target.value &&
|
`${router.pathname.replace('.html', '')}${'?q='}${encodeURIComponent(
|
||||||
'?q='}${encodeURIComponent(e.target.value)}`,
|
querySearch
|
||||||
|
)}`,
|
||||||
undefined,
|
undefined,
|
||||||
{ shallow: true }
|
{ shallow: true }
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue