usePageParams.tsx 269 B

12345678910111213
  1. import {useMemo} from 'react';
  2. import {decodeList} from 'sentry/utils/queryString';
  3. export function usePageParams(location) {
  4. const queries = useMemo(() => {
  5. return decodeList(location.query.query);
  6. }, [location.query.query]);
  7. return {
  8. queries,
  9. };
  10. }