useTransactionSamplesWebVitalsQuery.tsx 851 B

123456789101112131415161718192021222324252627282930313233343536
  1. import {useTransactionSamplesWebVitalsScoresQuery} from 'sentry/views/performance/browser/webVitals/utils/queries/storedScoreQueries/useTransactionSamplesWebVitalsScoresQuery';
  2. import type {WebVitals} from 'sentry/views/performance/browser/webVitals/utils/types';
  3. type Props = {
  4. transaction: string;
  5. enabled?: boolean;
  6. limit?: number;
  7. orderBy?: WebVitals | null;
  8. query?: string;
  9. sortName?: string;
  10. webVital?: WebVitals;
  11. withProfiles?: boolean;
  12. };
  13. export const useTransactionSamplesWebVitalsQuery = ({
  14. orderBy,
  15. limit,
  16. transaction,
  17. query,
  18. enabled,
  19. withProfiles,
  20. sortName,
  21. webVital,
  22. }: Props) => {
  23. const storedScoresResult = useTransactionSamplesWebVitalsScoresQuery({
  24. orderBy,
  25. limit,
  26. transaction,
  27. query,
  28. withProfiles,
  29. enabled,
  30. sortName,
  31. webVital,
  32. });
  33. return storedScoresResult;
  34. };