distinctLtps: [],
busy: false,
loadedOnce: false,
- error: undefined
+ error: undefined,
};
export const availableLtpsActionHandler: IActionHandler<IAvailableLtpsState> = (state = ltpListStateInit, action) => {
state = {
...state,
- busy: true
+ busy: true,
};
} else if (action instanceof AllAvailableLtpsLoadedAction) {
distinctLtps: action.availableLtps,
busy: false,
error: undefined,
- loadedOnce: true
+ loadedOnce: true,
};
} else if (action.error) {
state = {
...state,
busy: false,
loadedOnce: true,
- error: action.error
- }
+ error: action.error,
+ };
}
} else if (action instanceof SetInitialLoadedAction) {
state = {
...state,
- loadedOnce: action.initialLoaded
+ loadedOnce: action.initialLoaded,
};
} else if (action instanceof NoLtpsFoundAction) {
state = {
busy: false,
error: undefined,
loadedOnce: true,
- distinctLtps: []
- }
+ distinctLtps: [],
+ };
} else if (action instanceof ResetLtpsAction) {
state = {
...state,
busy: false,
error: undefined,
loadedOnce: false,
- distinctLtps: []
- }
- }
-
- else {
+ distinctLtps: [],
+ };
+ } else {
state = {
...state,
- busy: false
+ busy: false,
};
}