Commit 67624fad authored by Nicolas Frandeboeuf's avatar Nicolas Frandeboeuf
Browse files

Migrate budgets list to Typescript

parent f36d86c4
Pipeline #378081 passed with stage
in 4 minutes and 24 seconds
......@@ -108,13 +108,15 @@ function reduceFetch(state: BudgetState, action: Action<FetchBudgetParams>): Bud
// Set the selected period for budgets.
export function setSelectedPeriod(year: number, month: number) {
return (dispatch: Dispatch, getState: GetStateType): Promise<void> | void => {
return (dispatch: Dispatch, getState: GetStateType): Promise<void> => {
const action = setPeriodAction({ year, month });
dispatch(action);
if (!fromSelectedPeriod(getState().budgets)) {
return fetchFromYearAndMonth(year, month)(dispatch);
}
return Promise.resolve();
};
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment