hook to grab query parameters from react router
This commit is contained in:
1 parent
f54fa4cb34
commit
91a3c93985
2 files changed
+8
No files matched your search
@@ -0,0 +1,3 @@
|
||||
import useQuery from './useQuery.js';
|
||||
|
||||
export { useQuery };
|
||||
@@ -0,0 +1,5 @@
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
export default function useQuery() {
|
||||
return new URLSearchParams(useLocation().search);
|
||||
}
|
||||
Reference in new issue
Block a user