You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

archiveActiveAdReducer.js 602B

123456789101112131415161718192021222324252627282930
  1. import {
  2. ARCHIVE_ACTIVE_AD_SUCCESS,
  3. ARCHIVE_ACTIVE_AD_ERR,
  4. } from "../../actions/archiveActiveAd/archiveActiveAdActionConstants";
  5. import createReducer from "../../utils/createReducer";
  6. const initialState = {
  7. errorMessage: "",
  8. };
  9. export default createReducer(
  10. {
  11. [ARCHIVE_ACTIVE_AD_SUCCESS]: setArchiveActiveAd,
  12. [ARCHIVE_ACTIVE_AD_ERR]: setArchiveActiveAdErrorMessage,
  13. },
  14. initialState
  15. );
  16. function setArchiveActiveAd(state) {
  17. return {
  18. ...state,
  19. };
  20. }
  21. function setArchiveActiveAdErrorMessage(state, action) {
  22. return {
  23. ...state,
  24. errorMessage: action.payload,
  25. };
  26. }