import {Location, Query} from 'history'; import {useRouteContext} from 'sentry/utils/useRouteContext'; type DefaultQuery = { [key: string]: T | T[] | null | undefined; }; export function useLocation(): Location { const route = useRouteContext(); return route.location; }