widgetViewerContext.tsx 576 B

123456789101112131415161718192021
  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. tableData?: TableDataWithTitle[];
  9. totalIssuesCount?: string;
  10. }) => void;
  11. pageLinks?: string;
  12. seriesData?: Series[];
  13. tableData?: TableDataWithTitle[];
  14. totalIssuesCount?: string;
  15. };
  16. export const WidgetViewerContext = createContext<WidgetViewerContextProps>({
  17. setData: () => undefined,
  18. });