Skip to content

Commit d5411ee

Browse files
committed
chore: remove use effect
1 parent 269aab7 commit d5411ee

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/Common/Hooks/useUrlFilters/useUrlFilters.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { useEffect, useMemo, useRef } from 'react'
17+
import { useMemo, useRef } from 'react'
1818
import { useHistory, useLocation } from 'react-router-dom'
1919
import { getUrlWithSearchParams } from '@Common/Helper'
2020
import { DEFAULT_BASE_PAGE_SIZE, EXCLUDED_FALSY_VALUES, SortingOrder } from '../../Constants'
@@ -186,18 +186,6 @@ const useUrlFilters = <T = string, K = unknown>({
186186
_resetPageNumber()
187187
}
188188

189-
useEffect(() => {
190-
// if we have search string, set secondary params in local storage accordingly
191-
if (location.search) {
192-
localStorage.setItem(localStorageKey, JSON.stringify(parsedParams))
193-
return
194-
}
195-
const localStorageValue = localStorage.getItem(localStorageKey)
196-
if (localStorageValue) {
197-
updateSearchParams(JSON.parse(localStorageValue))
198-
}
199-
}, [])
200-
201189
return {
202190
pageSize,
203191
changePage,

0 commit comments

Comments
 (0)