ScreenInit.js 410 Bytes
Newer Older
Giang Tran committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import {NEW_SCREEN, CLEAR_SCREEN} from '../actions/actionTypes';

const initialState = {
  screen: null,
  id: null,
};
// @ts-ignore

export default function ScreenInitReducer(state = initialState, action) {
  switch (action.type) {
    case NEW_SCREEN: {
      console.log('action', action);
      return {screen: action.body.screen, id: action.body.id_record};
    }

    default:
      return state;
  }
}