summaryrefslogtreecommitdiff
path: root/src/lib/transaction/hooks
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-08-07 09:33:03 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-08-07 09:33:03 +0000
commit5b11b41d87ee96499e0b881840d0e88437969765 (patch)
treed50bf77a8b74ecf2eb51bc025b14eeb40b5a5879 /src/lib/transaction/hooks
parenta1e55b2746a86491fd13920199a9d590504608ee (diff)
parent3793e021ad7d9eb301befc8cc2b7fd19a30aa3e7 (diff)
Merged in feature/airway-bill (pull request #39)
Add pengiriman on detail transaction page
Diffstat (limited to 'src/lib/transaction/hooks')
-rw-r--r--src/lib/transaction/hooks/useAirwayBill.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/transaction/hooks/useAirwayBill.js b/src/lib/transaction/hooks/useAirwayBill.js
new file mode 100644
index 00000000..c711ab77
--- /dev/null
+++ b/src/lib/transaction/hooks/useAirwayBill.js
@@ -0,0 +1,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