mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 14:28:04 +00:00
Bump a lot of packages (#625)
* Bump react, luxon, swagger, uuid * Improved imports * Fixed vulnerabilities * Bump highlight.js and added eslint-plugin-react-hooks with fixes * Bump compare-versions, html-react-parser, react-intersection-observer, react-modern-drawer * Bump @tanstack/react-query, react-select * Added tsc:check script
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { useCallback } from "react";
|
||||
import { useCallback, useMemo } from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
|
||||
const useCustomSearchParams = () => {
|
||||
const [search, setSearch] = useSearchParams();
|
||||
const searchAsObject: { [key: string]: string } = Object.fromEntries(
|
||||
new URLSearchParams(search)
|
||||
const searchParamsObject: { [key: string]: string } = useMemo(
|
||||
() => Object.fromEntries(new URLSearchParams(search)),
|
||||
[search]
|
||||
);
|
||||
|
||||
const upsertSearchParams = useCallback(
|
||||
@@ -24,7 +25,7 @@ const useCustomSearchParams = () => {
|
||||
};
|
||||
|
||||
return {
|
||||
searchParamsObject: searchAsObject,
|
||||
searchParamsObject,
|
||||
setSearchParams: setSearch,
|
||||
upsertSearchParams,
|
||||
removeSearchParam,
|
||||
|
||||
Reference in New Issue
Block a user