Don't update url if using default sort
This commit is contained in:
parent
37ad47db99
commit
4ba051726e
|
@ -120,7 +120,7 @@ export function useQueryAndSortParams(options?: {
|
||||||
// If there's no sort option, then set the one from localstorage
|
// If there's no sort option, then set the one from localstorage
|
||||||
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 && localSort !== defaultSort) {
|
||||||
// Use replace to not break navigating back.
|
// Use replace to not break navigating back.
|
||||||
router.replace(
|
router.replace(
|
||||||
{ query: { ...router.query, s: localSort } },
|
{ query: { ...router.query, s: localSort } },
|
||||||
|
|
Loading…
Reference in New Issue
Block a user