import {actionPromise} from "../reducers/PromiseReducer"; import {gql} from "./PathDB"; import {actionMyOrder} from "../reducers/MyOrdersReducer"; const actionOrderFind = () => { return actionPromise('orderFind', gql(`query orderFind { OrderFind(query:"[{}]") { _id total createdAt orderGoods{ _id count price good{ _id name description images{ _id url } } } } }`) ) } export const actionFullOrderFind = () => async dispatch => { let value = await dispatch(actionOrderFind()) if (value){ dispatch(actionMyOrder(value)) } }