index.tsx 1.1 KB

1234567891011121314151617181920
  1. import {makeCombinedReducers} from 'sentry/utils/useCombinedReducer';
  2. import {tracePreferencesReducer} from 'sentry/views/performance/newTraceDetails/traceState/tracePreferences';
  3. import {traceRovingTabIndexReducer} from 'sentry/views/performance/newTraceDetails/traceState/traceRovingTabIndex';
  4. import {traceSearchReducer} from 'sentry/views/performance/newTraceDetails/traceState/traceSearch';
  5. import {traceTabsReducer} from 'sentry/views/performance/newTraceDetails/traceState/traceTabs';
  6. // Ensure that TS will throw an error if we forget to handle a reducer action case.
  7. // We do this because the reducer is combined with other reducers and we want to ensure
  8. // that we handle all possible actions from inside this reducer.
  9. export function traceReducerExhaustiveActionCheck(_x: never): void {}
  10. export const TraceReducer = makeCombinedReducers({
  11. tabs: traceTabsReducer,
  12. search: traceSearchReducer,
  13. rovingTabIndex: traceRovingTabIndexReducer,
  14. preferences: tracePreferencesReducer,
  15. });
  16. export type TraceReducerState = ReturnType<typeof TraceReducer>;
  17. export type TraceReducerAction = Parameters<typeof TraceReducer>[1];