Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
461 Bytes
import { getNextType } from '../../unit';
import * as reducerType from '../../unit/reducerType';
import { lastRecord, blockType } from '../../unit/const';
const initState = lastRecord && blockType.indexOf(lastRecord.next) !== -1 ?
lastRecord.next : getNextType();
const parse = (state = initState, action) => {
switch (action.type) {
case reducerType.NEXT_BLOCK:
return action.data;
default:
return state;
}
};
export default parse;