hook to grab query parameters from react router
This commit is contained in:
parent
f54fa4cb34
commit
91a3c93985
3
platform/viewer/src/hooks/index.js
Normal file
3
platform/viewer/src/hooks/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import useQuery from './useQuery.js';
|
||||||
|
|
||||||
|
export { useQuery };
|
||||||
5
platform/viewer/src/hooks/useQuery.js
Normal file
5
platform/viewer/src/hooks/useQuery.js
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
|
export default function useQuery() {
|
||||||
|
return new URLSearchParams(useLocation().search);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user