summaryrefslogtreecommitdiff
path: root/src/lib/transaction/hooks/useAirwayBill.js
blob: c711ab7749e223fa7e691fa41ab0a07688f98674 (plain)
1
2
3
4
5
6
7
8
9
10
11
import { useQuery } from 'react-query'
import airwayBillApi from '../api/airwayBillApi'

const useAirwayBill = ({ orderId }) => {
  const fetchAirwayBill = async () => await airwayBillApi({ orderId })
  const queryAirwayBill = useQuery(`airwayBill-${orderId}`, fetchAirwayBill)

  return { queryAirwayBill }
}

export default useAirwayBill