in src/reducers/recent.ts [32:42]
export default (state: IRecent = INITIAL_STATE, action: Action) => {
if (isType(action, actions.nav.selectType)) {
const recentWithoutCurrent = state.recent.filter((oldType) => oldType !== action.payload.type)
return {
...state,
recent: [action.payload.type].concat(recentWithoutCurrent).slice(0, MAX_RECENT)
}
}
return state
}