index.tsx 982 B

123456789101112131415161718192021
  1. import {makeCombinedReducers} from 'sentry/utils/useCombinedReducer';
  2. import {tracePreferencesReducer} from '../traceState/tracePreferences';
  3. import {traceRovingTabIndexReducer} from '../traceState/traceRovingTabIndex';
  4. import {traceSearchReducer} from '../traceState/traceSearch';
  5. import {traceTabsReducer} from '../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];