vega-frontend-monorepo/apps/token/src/hooks/use-search-params.ts
Matthew Russell 899277e6d4
Fixes for workflows (#291)
* change to setting envars rather than passing in via CLI

* update nx to latest patch version

* add env files for token-e2e, fix lint and ts errors

* move generate functions to mocs for trading e2e to avoid violating boundary rules

* add jsx compiler option for trading-e2e

* downgrade nextjs

* add testing-library to types declaration where required
2022-04-22 17:51:18 -07:00

12 lines
326 B
TypeScript

import * as React from 'react';
import { useLocation } from 'react-router-dom';
export function useSearchParams() {
const location = useLocation();
return React.useMemo(() => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return new URLSearchParams(location.search) as any;
}, [location]);
}