{"size": 541, "ext": "js", "max_stars_repo_path": "src/redux/reducers/reportDateReducer.js", "max_stars_repo_name": "Tel-Aviv/Havana", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/redux/reducers/reportDateReducer.js", "max_issues_repo_name": "Tel-Aviv/Havana", "max_issues_repo_issues_event_min_datetime": "2020-01-27T13:32:53.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-26T22:17:42.000Z", "max_forks_repo_path": "src/redux/reducers/reportDateReducer.js", "max_forks_repo_name": "Tel-Aviv/Havana", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 7, "max_forks_count": null, "avg_line_length": 16.90625, "max_line_length": 78, "alphanum_fraction": 0.5434380776}
// @flow
import moment from 'moment';
import { SET_REPORT_DATE } from "../actionTypes";

type State = {
    reportDate: moment
}

const initialState = {
  reportDate: moment(),
};

type Action = {
    type: string,
    data: moment
}

export default function(state: State = initialState, action: Action) : State {
    switch (action.type) {
        case SET_REPORT_DATE: {
            return {
                ...state,
                reportDate: action.data
            }
        }

        default:
            return state;    

    }
}
