widgetViewerContext.tsx 638 B

1234567891011121314151617181920212223
  1. import {createContext} from 'react';
  2. import {Series} from 'sentry/types/echarts';
  3. import {TableDataWithTitle} from 'sentry/utils/discover/discoverQuery';
  4. export type WidgetViewerContextProps = {
  5. setData: (data: {
  6. pageLinks?: string;
  7. seriesData?: Series[];
  8. seriesResultsType?: string;
  9. tableData?: TableDataWithTitle[];
  10. totalIssuesCount?: string;
  11. }) => void;
  12. pageLinks?: string;
  13. seriesData?: Series[];
  14. seriesResultsType?: string;
  15. tableData?: TableDataWithTitle[];
  16. totalIssuesCount?: string;
  17. };
  18. export const WidgetViewerContext = createContext<WidgetViewerContextProps>({
  19. setData: () => undefined,
  20. });