mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 14:28:04 +00:00
Rename frontend directory (#472)
* Rename directory * Cleanup * Recover lost images * remove lint
This commit is contained in:
13
frontend/src/hooks/useNavigateWithSearchParams.ts
Normal file
13
frontend/src/hooks/useNavigateWithSearchParams.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { useLocation, useNavigate } from "react-router-dom";
|
||||
|
||||
const useNavigateWithSearchParams = () => {
|
||||
const navigate = useNavigate();
|
||||
const { search } = useLocation();
|
||||
const navigateWithSearchParams = (url: string, ...restArgs: any[]) => {
|
||||
navigate(url + search, ...restArgs);
|
||||
};
|
||||
|
||||
return navigateWithSearchParams;
|
||||
};
|
||||
|
||||
export default useNavigateWithSearchParams;
|
||||
Reference in New Issue
Block a user