import * as types from './constants';

export const initialState = {
  openFeedbackModal: false,
};

const feedbackReducer =
(state = initialState, action) => {
  switch (action.type) {
    case types.OPEN_FEEDBACK_MODAL:
      return {
        ...state,
        openFeedbackModal: true,
      };
    default:
      return state;
  }
};

export default feedbackReducer;

import * as types from './constants';

export const initialState = {
  isAddingFeedback: false,
};

const feedbackReducer =
(state = initialState, action) => {
  switch (action.type) {
    case types.OPEN_FEEDBACK_MODAL:
      return {
        ...state,
        isAddingFeedback: !state.isAddingFeedback,
      };
    default:
      return state;
  }
};

export default feedbackReducer;

Update the name of state being updated
Update: Update the name of state being updated
