Improve reducer type
This commit is contained in:
parent
c4ad5e5d78
commit
7e83039999
|
@ -24,7 +24,6 @@ const store: any = {
|
||||||
},
|
},
|
||||||
instance: normalizeInstance({
|
instance: normalizeInstance({
|
||||||
version: '3.4.1 (compatible; TruthSocial 1.0.0)',
|
version: '3.4.1 (compatible; TruthSocial 1.0.0)',
|
||||||
software: 'TRUTHSOCIAL',
|
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -187,7 +187,7 @@ const accountsSelector = createSelector(
|
||||||
const extendedRootReducer = (
|
const extendedRootReducer = (
|
||||||
state: InferState<typeof appReducer>,
|
state: InferState<typeof appReducer>,
|
||||||
action: AnyAction,
|
action: AnyAction,
|
||||||
): ReturnType<typeof rootReducer> & { accounts: ReturnType<typeof accountsSelector> } => {
|
): ReturnType<typeof rootReducer> => {
|
||||||
const extendedState = rootReducer(state, action);
|
const extendedState = rootReducer(state, action);
|
||||||
return extendedState.set('accounts', accountsSelector(extendedState));
|
return extendedState.set('accounts', accountsSelector(extendedState));
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue