ttk-app-core
Version:
@ttk/recat enterprise develop framework
23 lines (20 loc) • 507 B
JavaScript
import { Map, fromJS, List } from 'immutable'
export function validateState(state = Map({
username: { state: 'success', message: '' },
password: { state: 'success', message: '' },
}), action) {
switch (action.type) {
case 'update':
return state.sfs(fromJS(action.data))
default:
return state
}
}
export function attributeForm(state = Map(), action) {
switch (action.type) {
case 'update':
return state.sfs(fromJS(action.data))
default:
return state
}
}