theluyuan 38ba663466
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
init
2025-09-02 14:49:16 +08:00

23 lines
444 B
TypeScript

import ReducerRegistry from '../redux/ReducerRegistry';
import { SET_LAST_N } from './actionTypes';
export interface ILastNState {
lastN?: number;
}
ReducerRegistry.register<ILastNState>('features/base/lastn', (state = {}, action): ILastNState => {
switch (action.type) {
case SET_LAST_N: {
const { lastN } = action;
return {
...state,
lastN
};
}
}
return state;
});