fix: Implement more APIs

This commit is contained in:
Alexander Polynomdivision
2018-09-24 13:36:42 +02:00
parent 11bbdc627f
commit 8b6bfb681b
9 changed files with 117 additions and 46 deletions

View File

@@ -39,6 +39,7 @@ interface IState {
dashboard: {
loadingNL: boolean;
loadingTT: boolean;
loadingLR: boolean;
};
review: {
@@ -97,6 +98,7 @@ const initialState: IState = {
dashboard: {
loadingNL: true,
loadingTT: true,
loadingLR: true,
},
review: {
@@ -243,6 +245,12 @@ export function LateinicusApp(state: IState = initialState, action: any) {
return Object.assign({}, state, {
didLogin: state,
});
case Actions.DASHBOARD_SET_LR_LOADING:
return Object.assign({}, state, {
dashboard: Object.assign({}, state.dashboard, {
loadingLR: action.state,
}),
});
default:
// Ignore the initialization call to the reducer. By that we can
// catch all actions that are not implemented