datePicker.tsx 591 B

1234567891011121314151617181920212223
  1. import DatePageFilter from 'sentry/components/datePageFilter';
  2. import {trackAnalytics} from 'sentry/utils/analytics';
  3. import useOrganization from 'sentry/utils/useOrganization';
  4. function StarfishDatePicker() {
  5. const organization = useOrganization();
  6. return (
  7. <DatePageFilter
  8. defaultPeriod="24h"
  9. alignDropdown="left"
  10. onChange={({start, end, relative}) => {
  11. trackAnalytics('starfish.page_filter.data_change', {
  12. organization,
  13. start,
  14. end,
  15. relative,
  16. });
  17. }}
  18. />
  19. );
  20. }
  21. export default StarfishDatePicker;