From 6103f6a89bb3eee7ef7abc879869f39af7b602ff Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 12 Nov 2022 20:41:55 +0100 Subject: [PATCH] Separated param definition and unpacking for readibility --- src/visits/reducers/common.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/visits/reducers/common.ts b/src/visits/reducers/common.ts index f32048d7..af1eedd1 100644 --- a/src/visits/reducers/common.ts +++ b/src/visits/reducers/common.ts @@ -99,15 +99,11 @@ export const lastVisitLoaderForLoader = ( export const createVisitsReducer = >( name: string, - { - asyncThunk, - largeAction, - fallbackToIntervalAction, - progressChangedAction, - }: AT, + asyncThunkCreator: AT, initialState: State, filterCreatedVisits: (state: State, createdVisits: CreateVisit[]) => CreateVisit[], ) => { + const { asyncThunk, largeAction, fallbackToIntervalAction, progressChangedAction } = asyncThunkCreator; const { reducer, actions } = createSlice({ name, initialState,