datePicker.tsx 625 B

123456789101112131415161718192021222324
  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. storageNamespace="starfish"
  11. onChange={({start, end, relative}) => {
  12. trackAnalytics('starfish.page_filter.data_change', {
  13. organization,
  14. start,
  15. end,
  16. relative,
  17. });
  18. }}
  19. />
  20. );
  21. }
  22. export default StarfishDatePicker;