{"size": 596, "ext": "js", "max_stars_repo_path": "src/js/reducers/createOffer.js", "max_stars_repo_name": "michaelplazek/blockparty", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/js/reducers/createOffer.js", "max_issues_repo_name": "michaelplazek/blockparty", "max_issues_repo_issues_event_min_datetime": "2020-05-23T19:10:32.000Z", "max_issues_repo_issues_event_max_datetime": "2021-05-11T01:52:49.000Z", "max_forks_repo_path": "src/js/reducers/createOffer.js", "max_forks_repo_name": "michaelplazek/blockparty", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 8, "max_forks_count": null, "avg_line_length": 20.5517241379, "max_line_length": 52, "alphanum_fraction": 0.6543624161}
import { stateReducer } from "./utils";
import {
  SET_OFFER_VOLUME,
  SET_CONTACT_INFO,
  RESET_OFFER,
  SET_OFFER_VOLUME_IN_USD
} from "../actions";

const initialState = {
  volume: 0.0001,
  volumeInUSD: 0.01,
  contactInfo: ""
};

const handlers = {
  [SET_OFFER_VOLUME]: (state, action) => ({
    volume: action.data
  }),
  [SET_OFFER_VOLUME_IN_USD]: (state, action) => ({
    volumeInUSD: action.data
  }),
  [SET_CONTACT_INFO]: (state, action) => ({
    contactInfo: action.data
  }),
  [RESET_OFFER]: () => ({ ...initialState })
};

export default stateReducer(initialState, handlers);
