Replacing .html

This commit is contained in:
mrfry 2020-11-07 09:14:47 +01:00
parent 447cbfc6a2
commit eec6f420b6

View file

@ -24,9 +24,8 @@ export default function AllQuestions({ router }) {
})
setSearchTerm(router.query.q ? decodeURIComponent(router.query.q) : '')
router.replace(
`${router.pathname}${e.target.value && '?q='}${encodeURIComponent(
e.target.value
)}`,
`${router.pathname.replace('.html', '')}${e.target.value &&
'?q='}${encodeURIComponent(e.target.value)}`,
undefined,
{ shallow: true }
)