WebJamApps/CollegeLutheran

View on GitHub
src/redux/reducers/tableReducer.ts

Summary

Maintainability
A
0 mins
Test Coverage
B
82%
const initialState = {
  showTable: true,
};

const reducer = (state = initialState, action: { type: string; showTable: boolean; }): { showTable: boolean } => {
  switch (action.type) {
    case 'SHOW_TABLE':
      return {
        ...state,
        showTable: action.showTable,
      };
    default:
      return state;
  }
};

export default reducer;