serge-web/serge-web

View on GitHub
client/src/ActionsAndReducers/dbWargames/wargames_Reducer.ts

Summary

Maintainability
A
2 hrs
Test Coverage

handlers has 22 functions (exceeds 20 allowed). Consider refactoring.
Open

const handlers: Record<string, ActionHandler> = {
  [ActionConstant.ALL_WARGAME_NAMES_SAVED]: (newState, action) => wargamesHandlers.handleAllWargameNamesSaved(newState, (action as AllWargameNameSaved).payload),
  [ActionConstant.SET_CURRENT_WARGAME]: (newState, action) => wargamesHandlers.handleSetCurrentWargame(newState, (action as SetCurrentWargame).payload),
  [ActionConstant.SET_EXPORT_WARGAME]: (newState, action) => wargamesHandlers.handleSetExportWargame(newState, (action as SetCurrentWargame).payload),
  [ActionConstant.SET_CURRENT_GAME_SETUP_TAB]: (newState, action) => wargamesHandlers.handleSetCurrentGameSetupTab(newState, (action as SetCurrentGameSetupTab).payload),
Severity: Minor
Found in client/src/ActionsAndReducers/dbWargames/wargames_Reducer.ts - About 2 hrs to fix

    There are no issues that match your filters.

    Category
    Status