help me․․․ I use next js, shallow-routing ... this two codes are from two different pages... i want to change the pages without rendering... first is working, but second doesn't working... is there something wrong in pathname...
const showFileType = async () => {
await setFileType(type)
await router.push({
pathname: '/all-files',
query: {
fileType: type
}
}, undefined, {shallow: true})
}
const showAuthorImageType = async () => {
await setAuthorImageType(type)
await router.push({
pathname: `/authors/${router.query.author}`,
query: {
authorImageType: type
}
}, undefined, {shallow: true})
}