diff options
| author | trisusilo <tri.susilo@altama.co.id> | 2023-08-09 03:47:02 +0000 |
|---|---|---|
| committer | trisusilo <tri.susilo@altama.co.id> | 2023-08-09 03:47:02 +0000 |
| commit | b93345e3aaad94d9d63f1aad2c7db35d30d0066c (patch) | |
| tree | 747cc9c244cd3f519980ea764277ff3008c1a76f /src/lib/transaction/hooks | |
| parent | 60fc875bac4044587de9d1ff9221b6f73beeb826 (diff) | |
| parent | eb5c023f81ed5cbe585c55566bb493ca5c3604fc (diff) | |
Merged in feature/airway-bill (pull request #47)
Feature/airway bill
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 |
