Migrated nonOrphanVisits reducer to RTK

This commit is contained in:
Alejandro Celaya
2022-11-12 18:18:16 +01:00
parent ab7c52d049
commit fd80fd65c9
5 changed files with 121 additions and 127 deletions

View File

@@ -65,10 +65,9 @@ export const domainVisitsReducerCreator = (
builder.addCase(largeAction, (state) => ({ ...state, loadingLarge: true }));
builder.addCase(progressChangedAction, (state, { payload: progress }) => ({ ...state, progress }));
builder.addCase(
fallbackToIntervalAction,
(state, { payload: fallbackInterval }) => ({ ...state, fallbackInterval }),
);
builder.addCase(fallbackToIntervalAction, (state, { payload: fallbackInterval }) => (
{ ...state, fallbackInterval }
));
builder.addCase(createNewVisits, (state, { payload }) => {
const { domain, visits, query = {} } = state;
@@ -82,7 +81,6 @@ export const domainVisitsReducerCreator = (
});
},
});
const { cancelGetDomainVisits } = actions;
return { reducer, cancelGetDomainVisits };