diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2023-08-07 09:33:03 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2023-08-07 09:33:03 +0000 |
| commit | 5b11b41d87ee96499e0b881840d0e88437969765 (patch) | |
| tree | d50bf77a8b74ecf2eb51bc025b14eeb40b5a5879 /src/lib/transaction/hooks | |
| parent | a1e55b2746a86491fd13920199a9d590504608ee (diff) | |
| parent | 3793e021ad7d9eb301befc8cc2b7fd19a30aa3e7 (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.js | 11 |
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 |
