mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 14:28:04 +00:00
Enabled recommended-requiring-type-checking as result type fixes provided (#632)
* Enabled recommended-requiring-type-checking * from .cjs to .js * check * check * check * check * A lot of types aligned and refactored * More strict types * Improvement * Improvements * Improvements * Fixed routs * Fixed import types
This commit is contained in:
@@ -12,19 +12,14 @@ const useNavigateWithSearchParams = () => {
|
||||
const { context } = useParams();
|
||||
|
||||
const { search } = useLocation();
|
||||
const navigateWithSearchParams = (
|
||||
url: string,
|
||||
...restArgs: NavigateOptions[]
|
||||
) => {
|
||||
return async (url: string, ...restArgs: NavigateOptions[]) => {
|
||||
let prefixedUrl = url;
|
||||
|
||||
if (!clusterMode) {
|
||||
prefixedUrl = `/${encodeURIComponent(context ?? "")}${url}`;
|
||||
}
|
||||
navigate(`${prefixedUrl}${search}`, ...restArgs);
|
||||
await navigate(`${prefixedUrl}${search}`, ...restArgs);
|
||||
};
|
||||
|
||||
return navigateWithSearchParams;
|
||||
};
|
||||
|
||||
export default useNavigateWithSearchParams;
|
||||
|
||||
Reference in New Issue
Block a user