blob: b2cb6289dfc2428c2522168299b349be9d49ff56 (
plain)
1
2
3
4
5
6
7
8
9
|
import { useLocation } from 'react-router-dom';
const useQuery = () => {
const location = useLocation();
const searchParams = new URLSearchParams(location.search);
return Object.fromEntries(searchParams);
};
export default useQuery;
|