export const constants = {
  INTERACTION_DETAIL_JUMP_PAGE: 'INTERACTION_DETAIL_JUMP_PAGE'
};

export const actions = {
  jumpPage(payload) {
    return {
      type: constants.INTERACTION_DETAIL_JUMP_PAGE,
      payload
    };
  }
};

export function reducers(state, { type, payload }) {
  switch (type) {
    case constants.INTERACTION_DETAIL_JUMP_PAGE: {
      return {
        ...state,
        activePage: payload.page,
        pageAnimation: payload.animation
      };
    }
    default:
      return state;
  }
}
