2020-04-17 10:14:13 -04:00
|
|
|
import { useLocation } from 'react-router-dom';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* hook that builds on useLocation to parse
|
|
|
|
|
* the query string for you.
|
|
|
|
|
*
|
|
|
|
|
* @name useQuery
|
|
|
|
|
*/
|
|
|
|
|
export default function() {
|
|
|
|
|
return new URLSearchParams(useLocation().search);
|
|
|
|
|
}
|