diff --git a/web/hooks/use-sort-and-query-params.tsx b/web/hooks/use-sort-and-query-params.tsx index 74de7f4c..642a4e90 100644 --- a/web/hooks/use-sort-and-query-params.tsx +++ b/web/hooks/use-sort-and-query-params.tsx @@ -69,7 +69,9 @@ export function useQueryAndSortParams(options?: { if (router.isReady && !sort && shouldLoadFromStorage) { const localSort = localStorage.getItem(MARKETS_SORT) as Sort if (localSort) { - setSort(localSort) + router.query.s = localSort + // Use replace to not break navigating back. + router.replace(router, undefined, { shallow: true }) } } })