Fix not being able to go back on markets pages / communities
This commit is contained in:
parent
a967f7459d
commit
8569a0362b
|
@ -69,7 +69,9 @@ export function useQueryAndSortParams(options?: {
|
||||||
if (router.isReady && !sort && shouldLoadFromStorage) {
|
if (router.isReady && !sort && shouldLoadFromStorage) {
|
||||||
const localSort = localStorage.getItem(MARKETS_SORT) as Sort
|
const localSort = localStorage.getItem(MARKETS_SORT) as Sort
|
||||||
if (localSort) {
|
if (localSort) {
|
||||||
setSort(localSort)
|
router.query.s = localSort
|
||||||
|
// Use replace to not break navigating back.
|
||||||
|
router.replace(router, undefined, { shallow: true })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user