import { message } from 'antd';
import * as service from '../services/ServiceProviderServices';

export default {
  namespace: 'Bom', 
  state: {
    Data: '',
  },

  reducers: {
    returnQuery(state, { Data }) {
      return { ...state, Data };
    },
  },

  effects: {
  
    *query({ }, { call, put }) {
      console.log("1")
      const resp = yield call(service.create); 
      let Data=resp;
      yield put({type: 'returnQuery',Data,});
    },
  },

  subscriptions: {
    setup({dispatch, history, query, store,}) {
      return history.listen(({ pathname, search }) => {});
    },
  },
};
