12345678910111213141516171819202122232425262728293031323334353637 |
- import type {Sort} from 'sentry/utils/discover/fields';
- import {useTransactionWebVitalsScoresQuery} from 'sentry/views/insights/browser/webVitals/queries/storedScoreQueries/useTransactionWebVitalsScoresQuery';
- import type {WebVitals} from 'sentry/views/insights/browser/webVitals/types';
- type Props = {
- defaultSort?: Sort;
- enabled?: boolean;
- limit?: number;
- query?: string;
- shouldEscapeFilters?: boolean;
- sortName?: string;
- transaction?: string | null;
- webVital?: WebVitals | 'total';
- };
- export const useTransactionWebVitalsQuery = ({
- limit,
- transaction,
- defaultSort,
- sortName = 'sort',
- webVital,
- enabled,
- query,
- shouldEscapeFilters = true,
- }: Props) => {
- const storedScoresResult = useTransactionWebVitalsScoresQuery({
- limit,
- transaction,
- defaultSort,
- sortName,
- enabled,
- webVital,
- query,
- shouldEscapeFilters,
- });
- return storedScoresResult;
- };
|