useDistribution.tsx 365 B

123456789101112
  1. import {ServerSideSamplingStore} from 'sentry/stores/serverSideSamplingStore';
  2. import {useLegacyStore} from 'sentry/stores/useLegacyStore';
  3. export function useDistribution() {
  4. const {distribution} = useLegacyStore(ServerSideSamplingStore);
  5. return {
  6. loading: distribution.loading,
  7. error: distribution.error,
  8. distribution: distribution.data,
  9. };
  10. }