mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-05-29 16:46:16 +00:00
Separated param definition and unpacking for readibility
This commit is contained in:
@@ -99,15 +99,11 @@ export const lastVisitLoaderForLoader = (
|
|||||||
|
|
||||||
export const createVisitsReducer = <State extends VisitsInfo, AT extends ReturnType<typeof createVisitsAsyncThunk>>(
|
export const createVisitsReducer = <State extends VisitsInfo, AT extends ReturnType<typeof createVisitsAsyncThunk>>(
|
||||||
name: string,
|
name: string,
|
||||||
{
|
asyncThunkCreator: AT,
|
||||||
asyncThunk,
|
|
||||||
largeAction,
|
|
||||||
fallbackToIntervalAction,
|
|
||||||
progressChangedAction,
|
|
||||||
}: AT,
|
|
||||||
initialState: State,
|
initialState: State,
|
||||||
filterCreatedVisits: (state: State, createdVisits: CreateVisit[]) => CreateVisit[],
|
filterCreatedVisits: (state: State, createdVisits: CreateVisit[]) => CreateVisit[],
|
||||||
) => {
|
) => {
|
||||||
|
const { asyncThunk, largeAction, fallbackToIntervalAction, progressChangedAction } = asyncThunkCreator;
|
||||||
const { reducer, actions } = createSlice({
|
const { reducer, actions } = createSlice({
|
||||||
name,
|
name,
|
||||||
initialState,
|
initialState,
|
||||||
|
|||||||
Reference in New Issue
Block a user